Enforce consistency capitalization and spelling of significant words.
npm install eslint-plugin-consistent-wordsEnforce consistency capitalization and spelling of significant words.
You'll first need to install ESLint:
``sh`
npm i eslint --save-dev
Next, install eslint-plugin-consistent-words:
`sh`
npm install eslint-plugin-consistent-words --save-dev
Add consistent-words to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:
`json`
{
"plugins": [
"consistent-words"
]
}
Then configure the rules you want to use under the rules section.
`json``
{
"rules": {
"consistent-words/consistent-capitalization": ["error", { "listOfStringsToEnforce": ["SalesForce"] } ]
}
}
| Name | Description |
| :------------------------------------------------------------------- | :---------------------------------------------------------------- |
| consistent-capitalization | This rule requires words/phrases to have the same capitalization. |