1.1.1 ā€¢ Published 2 years ago

eslint-plugin-f v1.1.1

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

eslint-plugin-f

Miscellanous Eslint rules for Javascript and React projects.

Installation

You'll first need to install ESLint:

npm i eslint -D

or

yarn add eslint -D

Next, install eslint-plugin-f:

npm install eslint-plugin-f -D

or

yarn add eslint-plugin-f -D

Usage

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.

āœ”šŸ”§RuleDescription
āœ”f/ensure-matching-remove-event-listenerEnforces that every addEventListener should have a matching removeEventListener in the same useEffect block
āœ”f/no-useless-assignmentDisallow the reassignment of a variable that was declared in the immediately previous line.

License

eslint-plugin-f is licensed under the MIT License.