3.0.0 • Published 3 years ago
eslint-plugin-ftgp v3.0.0
eslint-plugin-ftgp
Custom rules for FTGP
Installation
You'll first need to install ESLint:
$ npm i eslint --save-dev
Next, install eslint-plugin-ftgp
:
$ npm install eslint-plugin-ftgp --save-dev
Note: If you installed ESLint globally (using the -g
flag) then you must also install eslint-plugin-ftgp
globally.
Usage
Add ftgp
to the plugins section of your .eslintrc
configuration file. You can omit the eslint-plugin-
prefix:
{
"plugins": [
"ftgp"
]
}
Then configure the rules you want to use under the rules section.
{
"rules": {
"ftgp/rule-name": 2
}
}
Supported Rules
- ensure-super-calls-in-initialize: see documentation.
- no-class-name-array-nesting: documentation.
- no-class-name-template: documentation.
- no-class-name-ternary: documentation.
- no-class-name-useless: documentation.
- no-concatenated-polyglots: see documentation.
- no-untrimmed-polyglots: see documentation.
- only-literal-polyglots: see documentation.
- only-single-class-name-in-array: see documentation.
- require-class-comment: see documentation.
Contributing
Run all tests with:
npm test
Run only a specific test with:
mocha tests/lib/rules/only-literal-polyglots.js --reporter progress
Add a new rule with Yeoman's generator-eslint.
Release a new version by:
- running the tests
- changing the
version
property inpackage.json
- running
npm publish
- committing the new
package.json
- creating the release on github