@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

  1. {
  2. "plugins": [
  3. "@sencha/extjs"
  4. ],
  5. "extends": [
  6. // this rule is in the recommended configuration list
  7. // so including this line enables this rule
  8. "plugin:@sencha/extjs/recommended"
  9. ],
  10. "settings": {
  11. "extjs": {
  12. "toolkit": "classic",
  13. "fromVersion": 4,
  14. "toVersion": 'latest'
  15. }
  16. },
  17. "rules": {
  18. // optionally, you can specify the rule explicitly
  19. // and the errorlevel and any options set here
  20. // will override any defaults from the 'extends' section
  21. "@sencha/extjs/no-removed-config-usage": "error"
  22. }
  23. }

JavaScript

  1. var myMask = new Ext.LoadMask({
  2. msg : 'Please wait...',
  3. maskCls: 'mycustom-loadmask-mask',
  4. msgCls: 'mycustom-loadmask-msg',
  5. target : centerRegion
  6. });

Problem Messages reported by ESLint

  1. Usage of removed config 'maskCls' found for 'Ext.LoadMask'
  2. Usage of removed config 'msgCls' found for 'Ext.LoadMask'