@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

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

JavaScript

  1. // enableAria is a deprecated property of Ext
  2. Ext.define('MyCustomApp.Application', {
  3. name: 'MyCustomApp',
  4. extend: 'Ext.app.Application',
  5. init: function () {
  6. Ext.enableAria = false;
  7. }
  8. });

Problem Message reported by ESLint

  1. Usage of deprecated property 'enableAria' found for 'Ext'