npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ember-dictionary

v0.2.11

Published

Hunspell dictionary for Ember guides

Downloads

47

Readme

ember-dictionary

This is a custom Hunspell dictionary for spellchecking the Ember guides. It has the common technical terms used by the Ember community and helps enforce consistency across the guides.

For example, emberobserver and EmberObserver will be flagged as invalid, with a suggestion of Ember Observer.

In addition to spell checking, the markdown will be linted for repeated words, contraction errors and conssitency issues. See the documentation for the plugins used in the configuration file.

Dictionary

The Ember dictionary is merged with the en_US Hunspell dictionary. This simplifies configuration of retext-spell. The english dictionary will occasionally need to be remerged (~12-18 months) to keep it in sync. See en_US.lic for license.

Whenever the en_US dictionary is updated check for duplicate words using the command REV command discussed in CONTRIBUTING.

Installation

npm install ember-dictionary

or

yarn add ember-dictionary

Dependencies

All packages under the unified umbrella have been converted to ESM imports. The package versions below are the last versions before the conversion.

Using later versions will require setting the project to modules in package.json or updating the configuration. It's recommended that the versions are pinned to prevent breaking changes to the configuration.

Install the following devDependencies:

npm i -D [email protected]
npm i -D ember-dictionary
npm i -D [email protected]
npm i -D [email protected]
npm i -D [email protected]
npm i -D [email protected]
npm i -D [email protected]
npm i -D [email protected]
npm i -D [email protected]
npm i -D [email protected]
npm i -D [email protected]
npm i -D [email protected]
npm i -D [email protected]

Create a .remarkrc.js file in the project root and paste the configuration below into the file. A copy of .remarkrc.js is included in the repo.

// ./remark.js
/* eslint-env node */
const unified = require('unified');
const read = require('fs').readFileSync;
const ember = require('ember-dictionary');

exports.plugins = [
  [
    require('remark-retext'),
    unified().use({
      plugins: [
        [require('retext-contractions'), { straight: true }],
        require('retext-english'),
        require('retext-indefinite-article'),
        require('retext-repeated-words'),
        require('retext-syntax-urls'),
        [
          require('retext-spell'),
          {
            dictionary: ember,
            personal: read('./.local.dic')
          }
        ]
      ]
    })
  ],
  'remark-preset-lint-consistent',
  'remark-preset-lint-recommended',
  ['remark-lint-list-item-indent', 'space']
];

Addtional remark rules and settings can be added to the configuration. See the readme for remarkjs/remark-lint: plugins to check (lint) markdown code style for a complete listing. Additonal settings should be added to the end of the configuartion.

Local dictionary

Project specific words not included in the main dictionary can be added to a local dictionary. In the proejct root, create a file named .local.dic. Additonal words are added to this file with each word on its own line.

Note: The .local.dic file MUST be present even if they are not project specific words!

Ignore files

Ignore files during linting by adding them a .remarkignore file to the project's root. Generally, README.md and CONTRIBUTING.md would be excluded. Older documentation versions can also be added to save time during CI.

Finally

Add the following npm script to package.json. The --frail flag will generate errors causing the linting to fail. For warnings only remove --frail.

"lint:md": "remark . --frail"

Contributing

If you would like to add new words to the dictionary, read the contributing guide.