eslint-plugin-adamhamlin
TypeScript icon, indicating that this package has built-in type declarations

0.2.0 • Public • Published

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?

Package Sidebar

Install

npm i eslint-plugin-adamhamlin

Weekly Downloads

13

Version

0.2.0

License

MIT

Unpacked Size

54.7 kB

Total Files

31

Last publish

Collaborators

  • adamhamlin