eslint-plugin-naming-convention
v0.1.3
Published
ESLint plugin for enforcing naming conventions on variables and function names.
Downloads
1,676
Maintainers
Readme
eslint-plugin-naming-convention
ESLint plugin for enforcing naming conventions on variables and function names.
Installation
npm i -D eslint-plugin-naming-convention
Configuration
Add eslint-plugin-naming-convention
to the plugins section of your .eslintrc
configuration file. You can omit the eslint-plugin-
prefix:
{
"plugins": ["naming-convention"]
}
Then configure the rules you want to use under the rules section.
{
"rules": {
"naming-convention/boolean-var-naming-convention": [
"error",
{
"prefixes": ["is", "has"]
}
]
}
}
Rules
🔧 Automatically fixable by the --fix
CLI option.
💡 Manually fixable by editor suggestions.
| Name | Description | 🔧 | 💡 | | :--------------------------------------------------------------------------- | :------------------------------------------------------------------- | :- | :- | | boolean-var-naming-convention | Enforce the addition of a specified prefix to boolean variable names | 🔧 | 💡 |
License
eslint-plugin-naming-convention
is licensed under the MIT License.