Skip to content

polklabs/eslint-plugin-assorted-rules

Repository files navigation

eslint-plugin-assorted-rules

An assortment of linting rules for typescript and angular

Unit Tests

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 Default
if-else Enforce every if has an else warn
if-block Enforce all if statements have curly braces warn
while-block Enforce all while statements have curly braces warn
for-block Enforce all for statements have curly braces warn
switch-default Enforce switch statements have a default case warn
i-interface Enforce all interface names start with 'I' warn
file-lint-disable Don't allow disabling linting rules for entire file warn
triple-equals Always use === instead of == warn
hard-coded-colors Disallow hard coded colors in ts files false
jsdoc-required Enforce jsdoc comments for all methods

✅ Complete

🔧 In Progress

❓ Check if possible

Publishing (developer only)

npm run test
npm run build
npm run publish

About

An assortment of linting rules for typescript and angular

Topics

Resources

License

Stars

Watchers

Forks