aotaduy / eslint-plugin-spellcheck

MIT License
183 stars 17 forks source link

Read config from cspell.json #70

Open duncanbeevers opened 3 years ago

duncanbeevers commented 3 years ago

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.

Zamiell commented 3 years ago

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

aotaduy commented 3 years ago

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

duncanbeevers commented 3 years ago

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"
  ]
}
gajus commented 2 years ago

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