diff --git a/README.md b/README.md index b73f8f9a16..713ea378e6 100644 --- a/README.md +++ b/README.md @@ -101,10 +101,10 @@ module.exports = { | [closure-actions](docs/rules/closure-actions.md) | enforce usage of closure actions | ✅ | | | | [new-module-imports](docs/rules/new-module-imports.md) | enforce using "New Module Imports" from Ember RFC #176 | ✅ | | | | [no-array-prototype-extensions](docs/rules/no-array-prototype-extensions.md) | disallow usage of Ember's `Array` prototype extensions | | 🔧 | | -| [no-at-ember-render-modifiers](docs/rules/no-at-ember-render-modifiers.md) | disallow importing from @ember/render-modifiers | | | | -| [no-deprecated-router-transition-methods](docs/rules/no-deprecated-router-transition-methods.md) | enforce usage of router service transition methods | | 🔧 | | +| [no-at-ember-render-modifiers](docs/rules/no-at-ember-render-modifiers.md) | disallow importing from @ember/render-modifiers | ✅ | | | +| [no-deprecated-router-transition-methods](docs/rules/no-deprecated-router-transition-methods.md) | enforce usage of router service transition methods | ✅ | 🔧 | | | [no-function-prototype-extensions](docs/rules/no-function-prototype-extensions.md) | disallow usage of Ember's `function` prototype extensions | ✅ | | | -| [no-implicit-injections](docs/rules/no-implicit-injections.md) | enforce usage of implicit service injections | | 🔧 | | +| [no-implicit-injections](docs/rules/no-implicit-injections.md) | enforce usage of implicit service injections | ✅ | 🔧 | | | [no-mixins](docs/rules/no-mixins.md) | disallow the usage of mixins | ✅ | | | | [no-new-mixins](docs/rules/no-new-mixins.md) | disallow the creation of new mixins | ✅ | | | | [no-observers](docs/rules/no-observers.md) | disallow usage of observers | ✅ | | | @@ -140,7 +140,7 @@ module.exports = { | [no-classic-classes](docs/rules/no-classic-classes.md) | disallow "classic" classes in favor of native JS classes | ✅ | | | | [no-ember-super-in-es-classes](docs/rules/no-ember-super-in-es-classes.md) | disallow use of `this._super` in ES class methods | ✅ | 🔧 | | | [no-empty-glimmer-component-classes](docs/rules/no-empty-glimmer-component-classes.md) | disallow empty backing classes for Glimmer components | ✅ | | | -| [no-tracked-properties-from-args](docs/rules/no-tracked-properties-from-args.md) | disallow creating @tracked properties from this.args | | | | +| [no-tracked-properties-from-args](docs/rules/no-tracked-properties-from-args.md) | disallow creating @tracked properties from this.args | ✅ | | | ### jQuery @@ -159,7 +159,7 @@ module.exports = { | [no-incorrect-calls-with-inline-anonymous-functions](docs/rules/no-incorrect-calls-with-inline-anonymous-functions.md) | disallow inline anonymous functions as arguments to `debounce`, `once`, and `scheduleOnce` | ✅ | | | | [no-invalid-debug-function-arguments](docs/rules/no-invalid-debug-function-arguments.md) | disallow usages of Ember's `assert()` / `warn()` / `deprecate()` functions that have the arguments passed in the wrong order. | ✅ | | | | [no-restricted-property-modifications](docs/rules/no-restricted-property-modifications.md) | disallow modifying the specified properties | | 🔧 | | -| [no-runloop](docs/rules/no-runloop.md) | disallow usage of `@ember/runloop` functions | | | | +| [no-runloop](docs/rules/no-runloop.md) | disallow usage of `@ember/runloop` functions | ✅ | | | | [require-fetch-import](docs/rules/require-fetch-import.md) | enforce explicit import for `fetch()` | | | | ### Routes diff --git a/docs/rules/no-at-ember-render-modifiers.md b/docs/rules/no-at-ember-render-modifiers.md index 11c8131a23..6a76f95a48 100644 --- a/docs/rules/no-at-ember-render-modifiers.md +++ b/docs/rules/no-at-ember-render-modifiers.md @@ -1,5 +1,7 @@ # ember/no-at-ember-render-modifiers +💼 This rule is enabled in the ✅ `recommended` [config](https://github.com/ember-cli/eslint-plugin-ember#-configurations). + What's wrong with `{{did-insert}}`, `{{did-update}}`, and `{{will-destroy}}`? diff --git a/docs/rules/no-deprecated-router-transition-methods.md b/docs/rules/no-deprecated-router-transition-methods.md index 243455b262..3d077c3dfc 100644 --- a/docs/rules/no-deprecated-router-transition-methods.md +++ b/docs/rules/no-deprecated-router-transition-methods.md @@ -1,5 +1,7 @@ # ember/no-deprecated-router-transition-methods +💼 This rule is enabled in the ✅ `recommended` [config](https://github.com/ember-cli/eslint-plugin-ember#-configurations). + 🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/no-implicit-injections.md b/docs/rules/no-implicit-injections.md index c9337ee2aa..e54330b756 100644 --- a/docs/rules/no-implicit-injections.md +++ b/docs/rules/no-implicit-injections.md @@ -1,5 +1,7 @@ # ember/no-implicit-injections +💼 This rule is enabled in the ✅ `recommended` [config](https://github.com/ember-cli/eslint-plugin-ember#-configurations). + 🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/no-runloop.md b/docs/rules/no-runloop.md index ea3cb0116a..151409937f 100644 --- a/docs/rules/no-runloop.md +++ b/docs/rules/no-runloop.md @@ -1,5 +1,7 @@ # ember/no-runloop +💼 This rule is enabled in the ✅ `recommended` [config](https://github.com/ember-cli/eslint-plugin-ember#-configurations). + Ember's runloop functions are not lifecycle-aware and don't ensure that an object's async is cleaned up. It is recommended to use [`ember-lifeline`](https://ember-lifeline.github.io/ember-lifeline/), [`ember-concurrency`](http://ember-concurrency.com/docs/introduction/), or [`@ember/destroyable`](https://rfcs.emberjs.com/id/0580-destroyables/) instead. diff --git a/docs/rules/no-tracked-properties-from-args.md b/docs/rules/no-tracked-properties-from-args.md index 975233c292..b4e22dc4da 100644 --- a/docs/rules/no-tracked-properties-from-args.md +++ b/docs/rules/no-tracked-properties-from-args.md @@ -1,5 +1,7 @@ # ember/no-tracked-properties-from-args +💼 This rule is enabled in the ✅ `recommended` [config](https://github.com/ember-cli/eslint-plugin-ember#-configurations). + Disallow creation of @tracked properties from args. diff --git a/lib/recommended-rules.js b/lib/recommended-rules.js index 62d9d0b60b..360f10628b 100644 --- a/lib/recommended-rules.js +++ b/lib/recommended-rules.js @@ -15,6 +15,7 @@ module.exports = { "ember/no-actions-hash": "error", "ember/no-arrow-function-computed-properties": "error", "ember/no-assignment-of-untracked-properties-used-in-tracking-contexts": "error", + "ember/no-at-ember-render-modifiers": "error", "ember/no-attrs-in-components": "error", "ember/no-attrs-snapshot": "error", "ember/no-capital-letters-in-routes": "error", @@ -24,6 +25,7 @@ module.exports = { "ember/no-computed-properties-in-native-classes": "error", "ember/no-controller-access-in-routes": "error", "ember/no-deeply-nested-dependent-keys-with-each": "error", + "ember/no-deprecated-router-transition-methods": "error", "ember/no-duplicate-dependent-keys": "error", "ember/no-ember-super-in-es-classes": "error", "ember/no-ember-testing-in-module-scope": "error", @@ -32,6 +34,7 @@ module.exports = { "ember/no-get-with-default": "error", "ember/no-get": "error", "ember/no-global-jquery": "error", + "ember/no-implicit-injections": "error", "ember/no-incorrect-calls-with-inline-anonymous-functions": "error", "ember/no-incorrect-computed-macros": "error", "ember/no-invalid-debug-function-arguments": "error", @@ -48,6 +51,7 @@ module.exports = { "ember/no-pause-test": "error", "ember/no-private-routing-service": "error", "ember/no-restricted-resolver-tests": "error", + "ember/no-runloop": "error", "ember/no-settled-after-test-helper": "error", "ember/no-shadow-route-definition": "error", "ember/no-side-effects": "error", @@ -57,6 +61,7 @@ module.exports = { "ember/no-test-module-for": "error", "ember/no-test-support-import": "error", "ember/no-test-this-render": "error", + "ember/no-tracked-properties-from-args": "error", "ember/no-try-invoke": "error", "ember/no-unnecessary-route-path-option": "error", "ember/no-volatile-computed-properties": "error", diff --git a/lib/rules/no-at-ember-render-modifiers.js b/lib/rules/no-at-ember-render-modifiers.js index d3db3ce9e5..c1b0a4f8ff 100644 --- a/lib/rules/no-at-ember-render-modifiers.js +++ b/lib/rules/no-at-ember-render-modifiers.js @@ -17,7 +17,7 @@ module.exports = { docs: { description: 'disallow importing from @ember/render-modifiers', category: 'Deprecations', - recommended: false, + recommended: true, url: 'https://github.com/ember-cli/eslint-plugin-ember/tree/master/docs/rules/no-at-ember-render-modifiers.md', }, fixable: null, diff --git a/lib/rules/no-deprecated-router-transition-methods.js b/lib/rules/no-deprecated-router-transition-methods.js index 60b5c1eb20..7b8715ff88 100644 --- a/lib/rules/no-deprecated-router-transition-methods.js +++ b/lib/rules/no-deprecated-router-transition-methods.js @@ -54,7 +54,7 @@ module.exports = { docs: { description: 'enforce usage of router service transition methods', category: 'Deprecations', - recommended: false, + recommended: true, url: 'https://github.com/ember-cli/eslint-plugin-ember/tree/master/docs/rules/no-deprecated-router-transition-methods.md', }, fixable: 'code', diff --git a/lib/rules/no-implicit-injections.js b/lib/rules/no-implicit-injections.js index be749cd83c..583dc517b9 100644 --- a/lib/rules/no-implicit-injections.js +++ b/lib/rules/no-implicit-injections.js @@ -54,7 +54,7 @@ module.exports = { docs: { description: 'enforce usage of implicit service injections', category: 'Deprecations', - recommended: false, + recommended: true, url: 'https://github.com/ember-cli/eslint-plugin-ember/tree/master/docs/rules/no-implicit-injections.md', }, fixable: 'code', diff --git a/lib/rules/no-runloop.js b/lib/rules/no-runloop.js index 0ea3d45b6a..c13587e5ee 100644 --- a/lib/rules/no-runloop.js +++ b/lib/rules/no-runloop.js @@ -42,6 +42,7 @@ module.exports = { docs: { description: 'disallow usage of `@ember/runloop` functions', category: 'Miscellaneous', + recommended: true, url: 'https://github.com/ember-cli/eslint-plugin-ember/tree/master/docs/rules/no-runloop.md', }, fixable: null, diff --git a/lib/rules/no-tracked-properties-from-args.js b/lib/rules/no-tracked-properties-from-args.js index 373c00067a..88cb933e3c 100644 --- a/lib/rules/no-tracked-properties-from-args.js +++ b/lib/rules/no-tracked-properties-from-args.js @@ -34,7 +34,7 @@ module.exports = { docs: { description: 'disallow creating @tracked properties from this.args', category: 'Ember Octane', - recommended: false, + recommended: true, url: 'https://github.com/ember-cli/eslint-plugin-ember/tree/master/docs/rules/no-tracked-properties-from-args.md', }, fixable: null, diff --git a/tests/__snapshots__/recommended.js.snap b/tests/__snapshots__/recommended.js.snap index c52e7bdd9c..196daa7e78 100644 --- a/tests/__snapshots__/recommended.js.snap +++ b/tests/__snapshots__/recommended.js.snap @@ -12,6 +12,7 @@ exports[`recommended rules has the right list 1`] = ` "no-actions-hash", "no-arrow-function-computed-properties", "no-assignment-of-untracked-properties-used-in-tracking-contexts", + "no-at-ember-render-modifiers", "no-attrs-in-components", "no-attrs-snapshot", "no-capital-letters-in-routes", @@ -21,6 +22,7 @@ exports[`recommended rules has the right list 1`] = ` "no-computed-properties-in-native-classes", "no-controller-access-in-routes", "no-deeply-nested-dependent-keys-with-each", + "no-deprecated-router-transition-methods", "no-duplicate-dependent-keys", "no-ember-super-in-es-classes", "no-ember-testing-in-module-scope", @@ -29,6 +31,7 @@ exports[`recommended rules has the right list 1`] = ` "no-get-with-default", "no-get", "no-global-jquery", + "no-implicit-injections", "no-incorrect-calls-with-inline-anonymous-functions", "no-incorrect-computed-macros", "no-invalid-debug-function-arguments", @@ -45,6 +48,7 @@ exports[`recommended rules has the right list 1`] = ` "no-pause-test", "no-private-routing-service", "no-restricted-resolver-tests", + "no-runloop", "no-settled-after-test-helper", "no-shadow-route-definition", "no-side-effects", @@ -54,6 +58,7 @@ exports[`recommended rules has the right list 1`] = ` "no-test-module-for", "no-test-support-import", "no-test-this-render", + "no-tracked-properties-from-args", "no-try-invoke", "no-unnecessary-route-path-option", "no-volatile-computed-properties",