0.0.269 • Published 8 years ago

eslint-plugin-constant-check v0.0.269

Weekly downloads
2
License
ISC
Repository
github
Last release
8 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

8 years ago

0.0.268

8 years ago

0.0.267

8 years ago

0.0.266

8 years ago

0.0.265

9 years ago

0.0.264

9 years ago

0.0.263

9 years ago

0.0.262

9 years ago

0.0.261

9 years ago

0.0.260

9 years ago

0.0.259

9 years ago

0.0.258

9 years ago

0.0.257

9 years ago

0.0.256

9 years ago

0.0.255

9 years ago

0.0.254

9 years ago

0.0.253

9 years ago

0.0.252

9 years ago

0.0.251

9 years ago

0.0.25

9 years ago

0.0.24

9 years ago

0.0.23

9 years ago

0.0.22

9 years ago

0.0.21

9 years ago

0.0.20

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago

0.0.0

9 years ago