@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

  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-deprecated-config-usage": "warn"
  22. }
  23. }

JavaScript

  1. // multiSelect is a deprecated config of Ext.grid.Panel
  2. Ext.define('MyCustomGrid', {
  3. extend: 'Ext.grid.Panel',
  4. multiSelect: true
  5. });
  6. // simpleSelect is a deprecated config of Ext.grid.Panel
  7. Ext.create('Ext.Container', {
  8. items: [
  9. {
  10. xtype: 'grid',
  11. simpleSelect: true
  12. }
  13. ]
  14. });

Problem Messages reported by ESLint

  1. Usage of deprecated config 'multiSelect' found for 'Ext.grid.Panel'
  2. Usage of deprecated config 'simpleSelect' found for 'Ext.grid.Panel'