cspell-check-unused-words

1.1.1 • Public • Published

cspell-check-unused-words

cspell-check-unused-words is a helper program for people who use CSpell. It will check your "cspell.json" or "cspell.jsonc" file for unused words. You can use it in your linting pipeline to ensure that your project does not have any "orphaned" words.


Usage

Type the following command while in the root of your project:

npx cspell-check-unused-words
  • It will return 0 if all of the words are currently being used.
  • It will return 1 if there are one or more words that are unused.

More Info

CSpell is a fantastic tool that allows you to spell check your code. When using the CSpell VSCode extension, a blue squiggly line will appear underneath words that are misspelled.

Sometimes, these blue squiggly lines are false positives. When this is the case, you can right-click on the word and select "Spelling" --> "Add Words to CSpell Configuration". Doing this will automatically insert a new entry in the "cspell.json" file.

Over time, the word ignore list in the "cspell.json" file will become quite large. But because of code changes, not all of the words may still serve a purpose. For example, the original code that caused a spelling error might have been removed or changed. In order to clean up your words, you need to check every word to see if it is still being used.

This is where cspell-check-unused-words comes in. It will check every word in your configuration to ensure that it is still being used.


Readme

Keywords

Package Sidebar

Install

npm i cspell-check-unused-words

Weekly Downloads

13

Version

1.1.1

License

MIT

Unpacked Size

45.3 kB

Total Files

7

Last publish

Collaborators

  • zamiell