1.0.4 • Published 5 years ago
eslint-plugin-percolate v1.0.4
eslint-plugin-percolate
Percolate's custom Eslint rules
Installation
You'll first need to install ESLint and eslint-plugin-import:
$ npm i eslint eslint-plugin-import --save-dev
Next, install eslint-plugin-percolate
:
$ npm install eslint-plugin-percolate --save-dev
Note: If you installed ESLint globally (using the -g
flag) then you must also install eslint-plugin-percolate
globally.
Usage
Add percolate
to the plugins section of your .eslintrc
configuration file. You can omit the eslint-plugin-
prefix:
{
"plugins": ["percolate"]
}
Then configure the rules you want to use under the rules section.
{
"rules": {
"percolate/cjs-default": "error",
"percolate/no-jsx-id-attrs": "error"
}
}
Supported Rules
- cjs-default: Verifies that commonJS
require(...).default
andexport default ...
are in sync - no-jsx-id-attrs: Prevents "id" attribute on DOM elements in JSX