0.0.1 • Published 9 years ago
eslint-plugin-turbolinks-event-handling v0.0.1
eslint-plugin-turbolinks-event-handling
ESLint plugin to avoid registering vanilla or jquery event listeners multiple times when using turbolinks
Installation
You'll first need to install ESLint:
$ npm i eslint --save-devNext, install eslint-plugin-turbolinks-event-handling:
$ npm install eslint-plugin-turbolinks-event-handling --save-devNote: If you installed ESLint globally (using the -g flag) then you must also install eslint-plugin-turbolinks-event-handling globally.
Usage
Add turbolinks-event-handling to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:
{
"plugins": [
"turbolinks-event-handling"
]
}Then configure the rules you want to use under the rules section.
{
"rules": {
"turbolinks-event-handling/jquery-off-before-on": 2,
"turbolinks-event-handling/jquery-use-event-namespaces": 2,
"turbolinks-event-handling/vanilla-addeventlistener-needs-function-reference": 2
}
}