0.0.3 • Published 5 years ago

@lbennett/eslint-plugin-turbolinks-event-handling v0.0.3

Weekly downloads
-
License
MIT
Repository
gitlab
Last release
5 years ago

@lbennett/eslint-plugin-turbolinks-event-handling

ESLint plugin to avoid registering vanilla or jquery event listeners multiple times when using turbolinks

Installation

$ npm install @lbennett/eslint-plugin-turbolinks-event-handling --save-dev
$ yarn add @lbennett/eslint-plugin-turbolinks-event-handling --dev

Usage

Add @lbennett/turbolinks-event-handling to the plugins section of your .eslintrc configuration file.

{
  "plugins": [
    "@lbennett/turbolinks-event-handling"
  ]
}

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

{
  "rules": {
    "@lbennett/turbolinks-event-handling/jquery-off-before-on": 2,
    "@lbennett/turbolinks-event-handling/jquery-use-event-namespaces": 2,
    "@lbennett/turbolinks-event-handling/vanilla-addeventlistener-needs-function-reference": 2
  }
}