Thumbtack's custom ESLint Rules
You'll first need to install ESLint:
$ npm i eslint --save-dev
Next, install eslint-plugin-thumbtack
:
$ npm install eslint-plugin-thumbtack --save-dev
Note: If you installed ESLint globally (using the -g
flag) then you must also install eslint-plugin-thumbtack
globally.
Add thumbtack
to the plugins section of your .eslintrc
configuration file. You can omit the eslint-plugin-
prefix:
{
"plugins": ["thumbtack"]
}
Then configure the rules you want to use under the rules section.
{
"rules": {
"thumbtack/no-getters-setters": 2
}
}
-
no-getters-setters
: Disallow ES6 getters/setters -
chai-strict-equal
: Disallow Chai's assert.equal
In general, follow the official guide for creating new rules, and make sure each rule has test cases.
Yes, you can lint the linter.
npm run lint
npm run test