@sencha/extjs/no-deprecated-config-usage
Report the usage of a deprecated config
Rule Details
This rule will report when a deprecated config is being used.
In this example, we are using the multiSelect
and simpleSelect
configs of the Ext.grid.Panel
Class, which were deprecated in 4.1.1
. So upgrading from a prior version to a version greater than 4.1.1
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-config-usage": "warn"
}
}
JavaScript
// multiSelect is a deprecated config of Ext.grid.Panel
Ext.define('MyCustomGrid', {
extend: 'Ext.grid.Panel',
multiSelect: true
});
// simpleSelect is a deprecated config of Ext.grid.Panel
Ext.create('Ext.Container', {
items: [
{
xtype: 'grid',
simpleSelect: true
}
]
});
Problem Messages reported by ESLint
Usage of deprecated config 'multiSelect' found for 'Ext.grid.Panel'
Usage of deprecated config 'simpleSelect' found for 'Ext.grid.Panel'