0.0.2 • Published 4 years ago

eslint-plugin-zinky-eslint v0.0.2

Weekly downloads
-
License
ISC
Repository
-
Last release
4 years ago

eslint-plugin-zinky-eslint

this plugin is aimed to contain eslint rules specific to ZinkyJS

Installation

You'll first need to install ESLint:

npm i eslint --save-dev

Next, install eslint-plugin-zinky-eslint:

npm install eslint-plugin-zinky-eslint --save-dev

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

Usage

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

{
    "plugins": [
        "zinky-eslint"
    ]
}

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

{
    "rules": {
        "zinky-eslint/rule-name": 2
    }
}

Supported Rules

zinky-id-length

This rule behaves just like id-length native rule, taking into account, however, some ZinkyJS specificities.

  1. Skips method prefixes in operations (GET_, POST_, ...)
  2. Does not check BEFORE and AFTER hooks.

NOTE: You should not use id-length alongside this rule.

Code example:

/*eslint id-length: ["error", { "max": 5 }]*/

GET_abc() {} // is VALID because "abc" has a length less than 5

GET_abcdef() {} // is NOT VALID because "abcdef" has a length greater than 5

BEFORE_GET_abcdef() // does NOT cause an ERROR. Because it will not be checked
0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago

0.0.0

4 years ago