0.2.0 • Published 1 year ago

eslint-plugin-adamhamlin v0.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

ESLint Plugin

npm version CI Status Badge

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?