3.0.0 • Published 4 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-devNext, install eslint-plugin-ftgp:
$ npm install eslint-plugin-ftgp --save-devNote: 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 testRun only a specific test with:
mocha tests/lib/rules/only-literal-polyglots.js --reporter progressAdd a new rule with Yeoman's generator-eslint.
Release a new version by:
- running the tests
- changing the
versionproperty inpackage.json - running
npm publish - committing the new
package.json - creating the release on github