1.1.1 ⢠Published 4 years ago
eslint-plugin-f v1.1.1
eslint-plugin-f
Miscellanous Eslint rules for Javascript and React projects.
Installation
You'll first need to install ESLint:
npm i eslint -Dor
yarn add eslint -DNext, install eslint-plugin-f:
npm install eslint-plugin-f -Dor
yarn add eslint-plugin-f -DUsage
Add f (oreslint-plugin-f) to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:
{
"plugins": [
"f"
]
}Then configure the rules you want to use under the rules section.
{
"rules": {
"f/rule-name": 2
}
}List of supported rules
ā: Enabled in the recommended configuration.\
š§: Fixable with eslint --fix.
| ā | š§ | Rule | Description |
|---|---|---|---|
| ā | f/ensure-matching-remove-event-listener | Enforces that every addEventListener should have a matching removeEventListener in the same useEffect block | |
| ā | f/no-useless-assignment | Disallow the reassignment of a variable that was declared in the immediately previous line. |
License
eslint-plugin-f is licensed under the MIT License.