@atlassian/eslint-plugin-onready-checks

2.1.0 • Public • Published

Document onReady checks ESLint plugin

Several rules to discover direct and indirect usages of the DOMContentLoaded event.

Installation

You'll first need to install ESLint:

$ npm i eslint --save-dev

Next, install @atlassian/eslint-plugin-onready-checks:

$ npm install @atlassian/eslint-plugin-onready-checks --save-dev

Note: If you installed ESLint globally (using the -g flag) then you must also install @atlassian/eslint-plugin-onready-checks globally.

Usage

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

{
    "plugins": ["@atlassian/onready-checks"]
}

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

{
    "rules": {
        "onready-checks/rule-name": 2
    }
}

Supported Rules

  • no-ajs-toinit - Checks for use of the AJS.toInit function
  • no-domcontentloaded-handlers - Checks for direct use of the DOMContentLoaded event
  • no-jquery-onready - Checks for use of the DOMContentLoaded event via jQuery's onReady handling

Readme

Keywords

Package Sidebar

Install

npm i @atlassian/eslint-plugin-onready-checks

Weekly Downloads

0

Version

2.1.0

License

SEE LICENSE IN LICENSE.txt

Unpacked Size

13.6 kB

Total Files

10

Last publish

Collaborators

  • atlassianartifactteam
  • decompil3d
  • rafalsatl
  • kbielaski
  • dwalker
  • atlassian-aui
  • mdejongh
  • mszczepanski
  • cdarroch
  • dboyd
  • dmorrow
  • mstaas
  • cwhittington
  • 1999-atlassian
  • wyasvoin
  • xqiu
  • gleal-atlassian
  • mszpyra
  • bcytrowski
  • tilwin_atlassian
  • mrzymski
  • media-build-bot
  • akishore
  • timse
  • mkem114
  • tsebastian
  • sfp-release-bot