@sencha/extjs/no-removed-config-usage
Report the usage of a removed config
Rule Details
This rule will report when a removed config is being used.
In this example, maskCls
and msgCls
existed in versions 4 & 5 of the framework and were removed in version 6. Therefore, this problem will only be reported if the fromVersion
in the extjs settings is set to < 6 and the toVersion
is set to >= 6.
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-removed-config-usage": "error"
}
}
JavaScript
var myMask = new Ext.LoadMask({
msg : 'Please wait...',
maskCls: 'mycustom-loadmask-mask',
msgCls: 'mycustom-loadmask-msg',
target : centerRegion
});
Problem Messages reported by ESLint
Usage of removed config 'maskCls' found for 'Ext.LoadMask'
Usage of removed config 'msgCls' found for 'Ext.LoadMask'