eslint-plugin-spellcheck icon indicating copy to clipboard operation
eslint-plugin-spellcheck copied to clipboard

Read config from cspell.json

Open duncanbeevers opened this issue 3 years ago • 4 comments

It should be possible to configure the plugin to read the words lists from cspell config

This would enable a unified workflow for flagging spelling errors as part of the eslint pass rather than requiring a separate traversal of the filesystem with the cspell tool itself.

duncanbeevers avatar Feb 18 '21 14:02 duncanbeevers

This would be perfect! +1 for this idea. I'm already using cspell in a ton of my repositories.

Zamiell avatar Jun 14 '21 04:06 Zamiell

Do you mean to read the dictionaries? or the skipWords? I'm not familiar with cspell will check it out.

aotaduy avatar Jun 14 '21 12:06 aotaduy

Yeah; it includes a couple of pieces of config. A config I'm using at $job looks similar to this (except with a lot more words)

{
  "version": "0.1",
  "language": "en",
  "ignoreRegExpList": ["/@ts-expect-error.*/"],
  "words": [
    "backgrounded",
    "bitrates",
    "Chromecast"
  ],
  "ignoreWords": [
    "alac",
    "alexa",
    "alphabar",
    "armv"
  ]
}

duncanbeevers avatar Jun 14 '21 13:06 duncanbeevers

It would be nice if we simply supported ignoreWords and words. Everything else is less useful.

gajus avatar Oct 12 '21 05:10 gajus