@sencha/eslint-plugin-extjs
v7.8.0
Published
Custom ESLint plugin for Ext JS apps
Downloads
232
Maintainers
Readme
eslint-plugin-extjs
ESLint plugin for Ext JS
Installation
You'll first need to install ESLint:
$ npm install eslint --save-dev
Next, install @sencha/eslint-plugin-extjs
:
First, log into the one of Sencha's NPM repositories that hosts this package with the @sencha
scope.
If a current customer, you can use https://npm.sencha.com
$ npm login --registry=https://npm.sencha.com --scope=@sencha
If not a current customer you can request access from the Upgrade Adviser product page. And then run the following npm login command.
$ npm login --registry=https://sencha.myget.org/F/extjs-upgrade-adviser/npm/ --scope=@sencha
NOTE: In both cases, remember to replace the @
character in your username with '..'
two periods.
After you have logged into the correct NPM repo, you can install the package by executing the following:
$ npm install @sencha/eslint-plugin-extjs --save-dev
Note: If you installed ESLint globally (using the -g
flag) then you must also install eslint-plugin-extjs
globally.
$ npm install @sencha/eslint-plugin-extjs -g
Configuration
For the Ext JS plugin, you can enable all
of our recommended rules by adding plugin:@sencha/extjs/recommended
to the extends
section of your .eslintrc configuration file.
"extends": [
"plugin:@sencha/extjs/recommended"
]
To add only the rules
you want, add @sencha/extjs
to the plugins section of your .eslintrc
configuration file.
"plugins": [
"@sencha/extjs"
]
And then configure the rules you want to use under the rules section.
"rules": {
"@sencha/extjs/rule-name": 2
}
Supported Rules
Overrides
- @sencha/extjs/no-existing-alias-override: Report the overriding of an existing alias
- @sencha/extjs/no-existing-class-override: Report the overriding of an existing Class
- @sencha/extjs/no-existing-method-override: Report the overriding of an existing method
- @sencha/extjs/override-method-call: Report the calling of the override method
Deprecated items
- @sencha/extjs/no-deprecated-class-usage: Report the usage of a deprecated Class
- @sencha/extjs/no-deprecated-config-usage: Report the usage of a deprecated config
- @sencha/extjs/no-deprecated-method-call: Report the calling of a deprecated method
- @sencha/extjs/no-deprecated-method-override: Report the overriding of a deprecated method
- @sencha/extjs/no-deprecated-property-usage: Report the usage of a deprecated property
Private items
- @sencha/extjs/no-private-class-usage: Report the usage of a private Class
- @sencha/extjs/no-private-config-usage: Report the usage of a private config
- @sencha/extjs/no-private-method-call: Report the calling of a private method
- @sencha/extjs/no-private-method-override: Report the overriding of a private method
- @sencha/extjs/no-private-property-usage: Report the usage of a private property
Removed items
- @sencha/extjs/no-removed-class-usage: Report the usage of a removed Class
- @sencha/extjs/no-removed-config-usage: Report the usage of a removed config
- @sencha/extjs/no-removed-method-call: Report the calling of a removed method
- @sencha/extjs/no-removed-method-override: Report the overriding of a removed method
- @sencha/extjs/no-removed-property-usage: Report the usage of a removed property