eslint-plugin-event-listener

0.0.6 • Public • Published

eslint-plugin-event-listener

Check react-native memory leak by remind developer to remove any addEventListener in React-Native

This project is fork from eslint-plugin-change-listeners and modify some code

Installation

You'll first need to install ESLint:

$ npm i eslint --save-dev

Next, install eslint-plugin-event-listener:

$ npm install eslint-plugin-event-listener --save-dev

Note: If you installed ESLint globally (using the -g flag) then you must also install eslint-plugin-event-listener globally.

Usage

Add plugin:event-listener/recommended to the extends section of your .eslintrc configuration file.

Add event-listener to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
    "extends": ["plugin:event-listeners/recommended"],
    "plugins": [
        "event-listener"
    ]
}

Then configure the rules you want to use under the rules section.

{
    "rules": {
        "event-listener/remove-device-event-listener": 2
    }
}

Thanks

eslint-plugin-change-listeners

Package Sidebar

Install

npm i eslint-plugin-event-listener

Weekly Downloads

0

Version

0.0.6

License

ISC

Unpacked Size

23.2 kB

Total Files

12

Last publish

Collaborators

  • yangtao_blue
  • sinlucifer