Custom eslint rules for intrenal projects
You'll first need to install ESLint:
$ npm i eslint --save-dev
Next, install eslint-plugin-iruhl:
$ npm install eslint-plugin-iruhl --save-dev
Note: If you installed ESLint globally (using the -g flag) then you must also install eslint-plugin-iruhl globally.
Add iruhl to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:
{
"plugins": [
"iruhl"
]
}Then configure the rules you want to use under the rules section.
{
"rules": {
"iruhl/rule-name": 2
}
}- iruhl/sort-prop-types: Enforce propTypes declarations alphabetical sorting
- iruhl/no-props-reassign: Enforce propTypes declarations alphabetical sorting