1.2.1 • Published 5 months ago
eslint-plugin-assorted-rules v1.2.1
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 | ✅ |
triple-equals | Always use === instead of == | ✅ |
hardcoded-colors | Disallow hard coded colors in ts files | 🔧 |
jsdoc-required | Enforce jsdoc comments for all methods | ❓ |
✅ Complete
🔧 In Progress
❓ Check if possible
Publishing (developer only)
npm run build
npm run publish
1.2.1
5 months ago
1.1.7
9 months ago
1.1.6
9 months ago
1.1.5
1 year ago
1.1.4
1 year ago
1.1.3
2 years ago
1.1.2
2 years ago
1.1.1
2 years ago
1.0.10
2 years ago
1.0.9
2 years ago
1.0.8
2 years ago
1.0.7
2 years ago
1.0.6
2 years ago
1.0.5
2 years ago
1.0.4
2 years ago
1.0.3
2 years ago
1.0.2
2 years ago
1.0.1
2 years ago
1.0.0
2 years ago