0.0.8 • Published 5 years ago
eslint-plugin-xupea v0.0.8
eslint-plugin-xupea
sub and unsub should be paired
Installation
You'll first need to install ESLint:
$ npm i eslint --save-devNext, install eslint-plugin-xupea:
$ npm install eslint-plugin-xupea --save-devUsage
Add xupea to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:
{
"plugins": [
"xupea"
]
}Then configure the rules you want to use under the rules section.
{
"rules": {
"xupea/rule-name": 2
}
}Supported Rules
- xupea/unsubscribe: 强制在componentWillUnmount方法中移除指定事件的监听器