2.1.0 • Published 11 months ago
@atlassian/eslint-plugin-onready-checks v2.1.0
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-devNext, install @atlassian/eslint-plugin-onready-checks:
$ npm install @atlassian/eslint-plugin-onready-checks --save-devNote: 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 theAJS.toInitfunctionno-domcontentloaded-handlers- Checks for direct use of theDOMContentLoadedeventno-jquery-onready- Checks for use of theDOMContentLoadedevent via jQuery's onReady handling
0.0.1-alpha
11 months ago
2.1.0
2 years ago