tbroadley / spellchecker-cli

A command-line tool for spellchecking files.
MIT License
119 stars 16 forks source link

Add option for personal dictionary to be in `package.json` #67

Open cobaltt7 opened 3 years ago

cobaltt7 commented 3 years ago

I have too many files in my repository's root. For this reason, I would like to be able to move my personal dictionary to package.json. Like this:

{
  "name": "myProject",
  "dictionary": [
    "word1",
    "word2",
    "word3",
    ...
  ]
}
tbroadley commented 3 years ago

Thanks for the issue! This makes sense to me as a feature. I've seen other NPM packages like Babel or Husky do something similar. I'm imagining something similar to what you suggested: allowing users to put a dictionary under a top-level spellchecker key in package.json:

{
  "spellchecker": {
    "dictionary": ["..."]
  }
}

That way, we prevent collisions between this package's config and config from other packages or from NPM itself.