0.0.269 • Published 7 years ago

eslint-plugin-constant-check v0.0.269

Weekly downloads
2
License
ISC
Repository
github
Last release
7 years ago

eslint-plugin-constant-check

Plugin performs check for variable and value match

Installation

You'll first need to install ESLint:

$ npm i eslint --save-dev

Next, install eslint-plugin-constant-check:

$ npm install eslint-plugin-constant-check --save-dev

Note: If you installed ESLint globally (using the -g flag) then you must also install eslint-plugin-constant-check globally.

Usage

Add constant-check to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
    "plugins": [
        "constant-check"
    ]
}

Then configure the rules you want to use under the rules section.

{
    "rules": {
        "constant-check/rule-name": 2
    }
}

Supported Rules

exact-match

  • performs checks for uppercase variables only including non-object declarations however excluding boolean && number types
  • check for exact matches of all variables dec

    check tests/src/rules/exact-match.spec.js for examples

loose-match

  • performs checks for uppercase variables for object like declarations only
  • checks for typos

    check tests/src/rules/loose-match.spec.js for examples

suggest-constant

  • show warning if object should be UPPERCASE when most of the property values in an object match by loose-match

TODO

check objects partially, excluding computed keys

0.0.269

7 years ago

0.0.268

7 years ago

0.0.267

7 years ago

0.0.266

7 years ago

0.0.265

7 years ago

0.0.264

7 years ago

0.0.263

7 years ago

0.0.262

7 years ago

0.0.261

7 years ago

0.0.260

7 years ago

0.0.259

7 years ago

0.0.258

7 years ago

0.0.257

7 years ago

0.0.256

7 years ago

0.0.255

7 years ago

0.0.254

7 years ago

0.0.253

7 years ago

0.0.252

7 years ago

0.0.251

7 years ago

0.0.25

7 years ago

0.0.24

7 years ago

0.0.23

7 years ago

0.0.22

7 years ago

0.0.21

7 years ago

0.0.20

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago

0.0.0

7 years ago