eslint-plugin-adamhamlin
v1.0.0
Published
Collection of custom ESLint rules
Downloads
42
Maintainers
Readme
ESLint Plugin
My collection of miscellaneous custom ESLint rules!
Install
npm install eslint-plugin-adamhamlin --save-dev
Usage
Add adamhamlin
to the plugins section of your .eslintrc
configuration file:
{
"plugins": ["adamhamlin"]
}
Then configure the rules you want to use under the rules section.
{
"rules": {
"adamhamlin/no-empty-block-comment": "error",
"adamhamlin/opt-in-sort": "error",
"adamhamlin/forbid-pattern-everywhere": [
"error",
{
"patterns": ["bleep|bloop"]
}
]
}
}
Rules
This plugin makes the following lint rules available:
- no-emppty-block-comment - Block comments must have non-empty content.
- opt-in-sort - Enforce sorting of object keys, array values, or TS enums/interfaces/types by adding the
@sort
annotation. - forbid-pattern-everywhere - Specified pattern(s) are disallowed everywhere--in variables, functions, literals, property names, classes, types, interfaces, etc.
TODO
- Use eslint-doc-generator to generate the rules list?