@sencha/extjs/no-deprecated-property-usage
Report the usage of a deprecated property
Rule Details
This rule will report when a deprecated property is being used.
In this example, we are setting the Ext.enableAria
property to false
. This property was deprecated in 6.0.2. So upgrading from a prior version to a version greater than 6.0.2 will cause this problem to be reported.
ESLint Config
{
"plugins": [
"@sencha/extjs"
],
"extends": [
// this rule is in the recommended configuration list
// so including this line enables this rule
"plugin:@sencha/extjs/recommended"
],
"settings": {
"extjs": {
"toolkit": "classic",
"fromVersion": 4,
"toVersion": 'latest'
}
},
"rules": {
// optionally, you can specify the rule explicitly
// and the errorlevel and any options set here
// will override any defaults from the 'extends' section
"@sencha/extjs/no-deprecated-property-usage": "warn"
}
}
JavaScript
// enableAria is a deprecated property of Ext
Ext.define('MyCustomApp.Application', {
name: 'MyCustomApp',
extend: 'Ext.app.Application',
init: function () {
Ext.enableAria = false;
}
});
Problem Message reported by ESLint
Usage of deprecated property 'enableAria' found for 'Ext'