npm

eslint-plugin-assorted-rules

1.1.7 • Public • Published

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
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

Package Sidebar

Install

npm i eslint-plugin-assorted-rules

Weekly Downloads

24

Version

1.1.7

License

MIT

Unpacked Size

23.5 kB

Total Files

14

Last publish

Collaborators

  • polklabs