0.0.6 • Published 11 months ago
eslint-plugin-grob-style v0.0.6
eslint-plugin-grob-style
Coding rules of the GROB-NET4Industry frontend coding guidelines for ESLint.
Installation
You'll first need to install ESLint to your project, if it isn't already:
npm i eslint --save-dev
Next, install eslint-plugin-grob-style
:
npm install eslint-plugin-grob-style --save-dev
Usage
Add grob-style
to the plugins section of your .eslintrc
configuration file. You can omit the eslint-plugin-
prefix:
{
"plugins": [
"grob-style"
]
}
Then configure the rules you want to use under the rules section.
{
"rules": {
"grob-style/rule-name": 2
}
}
Tests
Tests can be run with:
npm test
Rules
🔧 Automatically fixable by the --fix
CLI option.
Name | Description | 🔧 |
---|---|---|
method-name | method name must be in camelCase | 🔧 |
variable-name-assigned-by-require | name of variable which assigned by require must be PascalCase | 🔧 |
variable-name-assigned-func | name of a variable which assigned a function must use camelCase | 🔧 |
variable-name-jquery-object | name of variable which assigned a jQuery object must start with 'jq_' | 🔧 |
variable-name-snake-case | name of variable which not assigned by require or as function must be snake case | 🔧 |