eslint-plugin-assorted-rules
v1.1.5
Published
plugin for custom eslint rules
Downloads
56
Maintainers
Readme
eslint-plugin-assorted-rules
An assortment of linting rules for typescript and angular
Installation
npm i --save-dev eslint eslint-plugin-assorted-rules
Note: If you installed ESLint globally then you must also install eslint-plugin-assorted-rules globally.
Usage
Add assorted-rules
to the plugins section of your .eslintrc
configuration file. You can omit the eslint-plugin-
prefix:
{
"plugins": ["assorted-rules"]
}
Then configure the rules you want to use under the rules section.
{
"rules": {
"assorted-rules/if-else": "warn"
}
}
Rules
| Name | Description | Status |
| :---------------- | :------------------------------- | :----- |
| if-else | Enforce every if
has an else
| ✅ |
| if-block | Enforce all if
statements have curly braces | ✅ |
| while-block | Enforce all while
statements have curly braces | ✅ |
| for-block | Enforce all for
statements have curly braces | ✅ |
| switch-default | Enforce switch
statements have a default
case| ✅ |
| i-interface | Enforce all interface
names start with 'I' | ✅ |
| file-lint-disable | Don't allow disabling linting rules for entire file | ✅ |
| jsdoc-required | Enforce jsdoc comments for all methods | ❓ |
✅ Complete
🔧 In Progress
❓ Check if possible
Publishing (developer only)
npm run build
npm run publish