Repository: ember-cli/eslint-plugin-ember
Pull request #731 (2020-03-25 22:04:02)

Enable additional `recommended` rules
Planned for V8 release in #699.


Patch:
diff --git a/README.md b/README.md
index 3b08e9a0..eea7d723 100644
--- a/README.md
+++ b/README.md
@@ -79,12 +79,12 @@ Rules are grouped by category to help you understand their purpose. Each rule ha
 | :car: | [no-computed-properties-in-native-classes](./docs/rules/no-computed-properties-in-native-classes.md) | disallow using computed properties in native classes |
 | :white_check_mark: | [no-deeply-nested-dependent-keys-with-each](./docs/rules/no-deeply-nested-dependent-keys-with-each.md) | disallow usage of deeply-nested computed property dependent keys with `@each` |
 | :white_check_mark: | [no-duplicate-dependent-keys](./docs/rules/no-duplicate-dependent-keys.md) | disallow repeating computed property dependent keys |
-| :wrench: | [no-incorrect-computed-macros](./docs/rules/no-incorrect-computed-macros.md) | disallow incorrect usage of computed property macros |
-| :wrench: | [no-invalid-dependent-keys](./docs/rules/no-invalid-dependent-keys.md) | disallow invalid dependent keys in computed properties |
+| :white_check_mark::wrench: | [no-incorrect-computed-macros](./docs/rules/no-incorrect-computed-macros.md) | disallow incorrect usage of computed property macros |
+| :white_check_mark::wrench: | [no-invalid-dependent-keys](./docs/rules/no-invalid-dependent-keys.md) | disallow invalid dependent keys in computed properties |
 | :white_check_mark: | [no-side-effects](./docs/rules/no-side-effects.md) | disallow unexpected side effects in computed properties |
 | :white_check_mark: | [no-volatile-computed-properties](./docs/rules/no-volatile-computed-properties.md) | disallow volatile computed properties |
-| :wrench: | [require-computed-macros](./docs/rules/require-computed-macros.md) | require using computed property macros when possible |
-| :wrench: | [require-computed-property-dependencies](./docs/rules/require-computed-property-dependencies.md) | require dependencies to be declared statically in computed properties |
+| :white_check_mark::wrench: | [require-computed-macros](./docs/rules/require-computed-macros.md) | require using computed property macros when possible |
+| :white_check_mark::wrench: | [require-computed-property-dependencies](./docs/rules/require-computed-property-dependencies.md) | require dependencies to be declared statically in computed properties |
 | :white_check_mark: | [require-return-from-computed](./docs/rules/require-return-from-computed.md) | disallow missing return statements in computed properties |
 | :white_check_mark: | [use-brace-expansion](./docs/rules/use-brace-expansion.md) | enforce usage of brace expansion in computed property dependent keys |
 
@@ -103,7 +103,7 @@ Rules are grouped by category to help you understand their purpose. Each rule ha
 | :white_check_mark: | [closure-actions](./docs/rules/closure-actions.md) | enforce usage of closure actions |
 | :white_check_mark: | [new-module-imports](./docs/rules/new-module-imports.md) | enforce using "New Module Imports" from Ember RFC #176 |
 | :white_check_mark: | [no-function-prototype-extensions](./docs/rules/no-function-prototype-extensions.md) | disallow usage of Ember's `function` prototype extensions |
-|  | [no-mixins](./docs/rules/no-mixins.md) | disallow the usage of mixins |
+| :white_check_mark: | [no-mixins](./docs/rules/no-mixins.md) | disallow the usage of mixins |
 | :white_check_mark: | [no-new-mixins](./docs/rules/no-new-mixins.md) | disallow the creation of new mixins |
 | :white_check_mark: | [no-observers](./docs/rules/no-observers.md) | disallow usage of observers |
 | :white_check_mark::wrench: | [no-old-shims](./docs/rules/no-old-shims.md) | disallow usage of old shims for modules |
@@ -112,16 +112,16 @@ Rules are grouped by category to help you understand their purpose. Each rule ha
 
 |    | Rule ID | Description |
 |:---|:--------|:------------|
-|  | [no-empty-attrs](./docs/rules/no-empty-attrs.md) | disallow usage of empty attributes in Ember Data models |
-| :wrench: | [use-ember-data-rfc-395-imports](./docs/rules/use-ember-data-rfc-395-imports.md) | enforce usage of `@ember-data/` package imports instead `ember-data` |
+| :white_check_mark: | [no-empty-attrs](./docs/rules/no-empty-attrs.md) | disallow usage of empty attributes in Ember Data models |
+| :white_check_mark::wrench: | [use-ember-data-rfc-395-imports](./docs/rules/use-ember-data-rfc-395-imports.md) | enforce usage of `@ember-data/` package imports instead `ember-data` |
 
 ### Ember Object
 
 |    | Rule ID | Description |
 |:---|:--------|:------------|
 | :white_check_mark: | [avoid-leaking-state-in-ember-objects](./docs/rules/avoid-leaking-state-in-ember-objects.md) | disallow state leakage |
-| :car: | [no-get-with-default](./docs/rules/no-get-with-default.md) | disallow usage of the Ember's `getWithDefault` function |
-| :car::wrench: | [no-get](./docs/rules/no-get.md) | require using ES5 getters instead of Ember's `get` / `getProperties` functions |
+| :white_check_mark: | [no-get-with-default](./docs/rules/no-get-with-default.md) | disallow usage of the Ember's `getWithDefault` function |
+| :white_check_mark::wrench: | [no-get](./docs/rules/no-get.md) | require using ES5 getters instead of Ember's `get` / `getProperties` functions |
 |  | [no-proxies](./docs/rules/no-proxies.md) | disallow using array or object proxies |
 | :white_check_mark: | [require-super-in-init](./docs/rules/require-super-in-init.md) | require `this._super` to be called in `init` hooks |
 | :wrench: | [use-ember-get-and-set](./docs/rules/use-ember-get-and-set.md) | enforce usage of `Ember.get` and `Ember.set` |
@@ -142,7 +142,7 @@ Rules are grouped by category to help you understand their purpose. Each rule ha
 |:---|:--------|:------------|
 | :white_check_mark: | [jquery-ember-run](./docs/rules/jquery-ember-run.md) | disallow usage of jQuery without an Ember run loop |
 | :white_check_mark: | [no-global-jquery](./docs/rules/no-global-jquery.md) | disallow usage of global jQuery object |
-| :car: | [no-jquery](./docs/rules/no-jquery.md) | disallow any usage of jQuery |
+| :white_check_mark: | [no-jquery](./docs/rules/no-jquery.md) | disallow any usage of jQuery |
 
 ### Miscellaneous
 
@@ -157,7 +157,7 @@ Rules are grouped by category to help you understand their purpose. Each rule ha
 |    | Rule ID | Description |
 |:---|:--------|:------------|
 | :white_check_mark: | [no-capital-letters-in-routes](./docs/rules/no-capital-letters-in-routes.md) | disallow routes with uppercased letters in router.js |
-|  | [no-private-routing-service](./docs/rules/no-private-routing-service.md) | disallow injecting the private routing service |
+| :white_check_mark: | [no-private-routing-service](./docs/rules/no-private-routing-service.md) | disallow injecting the private routing service |
 |  | [no-unnecessary-index-route](./docs/rules/no-unnecessary-index-route.md) | disallow unnecessary `index` route definition |
 | :white_check_mark::wrench: | [no-unnecessary-route-path-option](./docs/rules/no-unnecessary-route-path-option.md) | disallow unnecessary usage of the route `path` option |
 |  | [route-path-style](./docs/rules/route-path-style.md) | enforce usage of kebab-case (instead of snake_case or camelCase) in route paths |
@@ -179,13 +179,13 @@ Rules are grouped by category to help you understand their purpose. Each rule ha
 |:---|:--------|:------------|
 | :white_check_mark: | [no-ember-testing-in-module-scope](./docs/rules/no-ember-testing-in-module-scope.md) | disallow use of `Ember.testing` in module scope |
 |  | [no-invalid-test-waiters](./docs/rules/no-invalid-test-waiters.md) | disallow incorrect usage of test waiter APIs |
-|  | [no-legacy-test-waiters](./docs/rules/no-legacy-test-waiters.md) | disallow the use of the legacy test waiter APIs |
-|  | [no-pause-test](./docs/rules/no-pause-test.md) | disallow usage of the `pauseTest` helper in tests |
+| :white_check_mark: | [no-legacy-test-waiters](./docs/rules/no-legacy-test-waiters.md) | disallow the use of the legacy test waiter APIs |
+| :white_check_mark: | [no-pause-test](./docs/rules/no-pause-test.md) | disallow usage of the `pauseTest` helper in tests |
 |  | [no-replace-test-comments](./docs/rules/no-replace-test-comments.md) | disallow 'Replace this with your real tests' comments in test files |
 | :white_check_mark: | [no-restricted-resolver-tests](./docs/rules/no-restricted-resolver-tests.md) | disallow the use of patterns that use the restricted resolver in tests |
-|  | [no-test-and-then](./docs/rules/no-test-and-then.md) | disallow usage of the `andThen` test wait helper |
-|  | [no-test-import-export](./docs/rules/no-test-import-export.md) | disallow importing of "-test.js" in a test file and exporting from a test file |
-|  | [no-test-module-for](./docs/rules/no-test-module-for.md) | disallow usage of `moduleFor`, `moduleForComponent`, etc |
+| :white_check_mark: | [no-test-and-then](./docs/rules/no-test-and-then.md) | disallow usage of the `andThen` test wait helper |
+| :white_check_mark: | [no-test-import-export](./docs/rules/no-test-import-export.md) | disallow importing of "-test.js" in a test file and exporting from a test file |
+| :white_check_mark: | [no-test-module-for](./docs/rules/no-test-module-for.md) | disallow usage of `moduleFor`, `moduleForComponent`, etc |
 
 <!--RULES_TABLE_END-->
 
diff --git a/lib/octane-rules.js b/lib/octane-rules.js
index 371af870..e7beeb2a 100644
--- a/lib/octane-rules.js
+++ b/lib/octane-rules.js
@@ -12,8 +12,5 @@ module.exports = {
   "ember/no-classic-components": "error",
   "ember/no-component-lifecycle-hooks": "error",
   "ember/no-computed-properties-in-native-classes": "error",
-  "ember/no-get-with-default": "error",
-  "ember/no-get": "error",
-  "ember/no-jquery": "error",
   "ember/require-tagless-components": "error"
 }
\ No newline at end of file
diff --git a/lib/recommended-rules.js b/lib/recommended-rules.js
index 6fc019ab..e704d4be 100644
--- a/lib/recommended-rules.js
+++ b/lib/recommended-rules.js
@@ -29,32 +29,32 @@ module.exports = {
   "ember/no-duplicate-dependent-keys": "error",
   "ember/no-ember-super-in-es-classes": "error",
   "ember/no-ember-testing-in-module-scope": "error",
-  "ember/no-empty-attrs": "off",
+  "ember/no-empty-attrs": "error",
   "ember/no-function-prototype-extensions": "error",
-  "ember/no-get-with-default": "off",
-  "ember/no-get": "off",
+  "ember/no-get-with-default": "error",
+  "ember/no-get": "error",
   "ember/no-global-jquery": "error",
   "ember/no-incorrect-calls-with-inline-anonymous-functions": "error",
-  "ember/no-incorrect-computed-macros": "off",
+  "ember/no-incorrect-computed-macros": "error",
   "ember/no-invalid-debug-function-arguments": "error",
-  "ember/no-invalid-dependent-keys": "off",
+  "ember/no-invalid-dependent-keys": "error",
   "ember/no-invalid-test-waiters": "off",
-  "ember/no-jquery": "off",
-  "ember/no-legacy-test-waiters": "off",
-  "ember/no-mixins": "off",
+  "ember/no-jquery": "error",
+  "ember/no-legacy-test-waiters": "error",
+  "ember/no-mixins": "error",
   "ember/no-new-mixins": "error",
   "ember/no-observers": "error",
   "ember/no-old-shims": "error",
   "ember/no-on-calls-in-components": "error",
-  "ember/no-pause-test": "off",
-  "ember/no-private-routing-service": "off",
+  "ember/no-pause-test": "error",
+  "ember/no-private-routing-service": "error",
   "ember/no-proxies": "off",
   "ember/no-replace-test-comments": "off",
   "ember/no-restricted-resolver-tests": "error",
   "ember/no-side-effects": "error",
-  "ember/no-test-and-then": "off",
-  "ember/no-test-import-export": "off",
-  "ember/no-test-module-for": "off",
+  "ember/no-test-and-then": "error",
+  "ember/no-test-import-export": "error",
+  "ember/no-test-module-for": "error",
   "ember/no-unnecessary-index-route": "off",
   "ember/no-unnecessary-route-path-option": "error",
   "ember/no-unnecessary-service-injection-argument": "off",
@@ -63,14 +63,14 @@ module.exports = {
   "ember/order-in-controllers": "off",
   "ember/order-in-models": "off",
   "ember/order-in-routes": "off",
-  "ember/require-computed-macros": "off",
-  "ember/require-computed-property-dependencies": "off",
+  "ember/require-computed-macros": "error",
+  "ember/require-computed-property-dependencies": "error",
   "ember/require-return-from-computed": "error",
   "ember/require-super-in-init": "error",
   "ember/require-tagless-components": "off",
   "ember/route-path-style": "off",
   "ember/routes-segments-snake-case": "error",
   "ember/use-brace-expansion": "error",
-  "ember/use-ember-data-rfc-395-imports": "off",
+  "ember/use-ember-data-rfc-395-imports": "error",
   "ember/use-ember-get-and-set": "off"
 }
\ No newline at end of file
diff --git a/lib/rules/no-empty-attrs.js b/lib/rules/no-empty-attrs.js
index 0bf53f04..c595dbec 100644
--- a/lib/rules/no-empty-attrs.js
+++ b/lib/rules/no-empty-attrs.js
@@ -12,7 +12,7 @@ module.exports = {
     docs: {
       description: 'disallow usage of empty attributes in Ember Data models',
       category: 'Ember Data',
-      recommended: false,
+      recommended: true,
       url:
         'https://github.com/ember-cli/eslint-plugin-ember/tree/master/docs/rules/no-empty-attrs.md',
     },
diff --git a/lib/rules/no-get-with-default.js b/lib/rules/no-get-with-default.js
index c3d2e9ed..31b8f1e7 100644
--- a/lib/rules/no-get-with-default.js
+++ b/lib/rules/no-get-with-default.js
@@ -11,8 +11,7 @@ module.exports = {
     docs: {
       description: "disallow usage of the Ember's `getWithDefault` function",
       category: 'Ember Object',
-      recommended: false,
-      octane: true,
+      recommended: true,
       url:
         'https://github.com/ember-cli/eslint-plugin-ember/tree/master/docs/rules/no-get-with-default.md',
     },
diff --git a/lib/rules/no-get.js b/lib/rules/no-get.js
index 879890c5..b9c7d5ef 100644
--- a/lib/rules/no-get.js
+++ b/lib/rules/no-get.js
@@ -25,8 +25,7 @@ module.exports = {
     docs: {
       description: "require using ES5 getters instead of Ember's `get` / `getProperties` functions",
       category: 'Ember Object',
-      recommended: false,
-      octane: true,
+      recommended: true,
       url: 'https://github.com/ember-cli/eslint-plugin-ember/tree/master/docs/rules/no-get.md',
     },
     fixable: 'code',
diff --git a/lib/rules/no-incorrect-computed-macros.js b/lib/rules/no-incorrect-computed-macros.js
index 37fded0d..2fbe3fa7 100644
--- a/lib/rules/no-incorrect-computed-macros.js
+++ b/lib/rules/no-incorrect-computed-macros.js
@@ -13,7 +13,7 @@ module.exports = {
     docs: {
       description: 'disallow incorrect usage of computed property macros',
       category: 'Computed Properties',
-      recommended: false,
+      recommended: true,
       url:
         'https://github.com/ember-cli/eslint-plugin-ember/tree/master/docs/rules/no-incorrect-computed-macros.md',
     },
diff --git a/lib/rules/no-invalid-dependent-keys.js b/lib/rules/no-invalid-dependent-keys.js
index 88f9188f..8a4dfcb3 100644
--- a/lib/rules/no-invalid-dependent-keys.js
+++ b/lib/rules/no-invalid-dependent-keys.js
@@ -32,7 +32,7 @@ module.exports = {
     docs: {
       description: 'disallow invalid dependent keys in computed properties',
       category: 'Computed Properties',
-      recommended: false,
+      recommended: true,
       url:
         'https://github.com/ember-cli/eslint-plugin-ember/tree/master/docs/rules/no-invalid-dependent-keys.md',
     },
diff --git a/lib/rules/no-jquery.js b/lib/rules/no-jquery.js
index 68e195c4..e82cc273 100644
--- a/lib/rules/no-jquery.js
+++ b/lib/rules/no-jquery.js
@@ -17,8 +17,7 @@ module.exports = {
     docs: {
       description: 'disallow any usage of jQuery',
       category: 'jQuery',
-      recommended: false,
-      octane: true,
+      recommended: true,
       url: 'https://github.com/ember-cli/eslint-plugin-ember/tree/master/docs/rules/no-jquery.md',
     },
     fixable: null,
diff --git a/lib/rules/no-mixins.js b/lib/rules/no-mixins.js
index 3ad81ab9..0b6c3088 100644
--- a/lib/rules/no-mixins.js
+++ b/lib/rules/no-mixins.js
@@ -13,7 +13,7 @@ module.exports = {
     docs: {
       description: 'disallow the usage of mixins',
       category: 'Deprecations',
-      recommended: false,
+      recommended: true,
       url: 'https://github.com/ember-cli/eslint-plugin-ember/tree/master/docs/rules/no-mixins.md',
     },
     fixable: null,
diff --git a/lib/rules/no-private-routing-service.js b/lib/rules/no-private-routing-service.js
index bddbf85c..07497a72 100644
--- a/lib/rules/no-private-routing-service.js
+++ b/lib/rules/no-private-routing-service.js
@@ -16,7 +16,7 @@ module.exports = {
     docs: {
       description: 'disallow injecting the private routing service',
       category: 'Routes',
-      recommended: false,
+      recommended: true,
       url:
         'https://github.com/ember-cli/eslint-plugin-ember/tree/master/docs/rules/no-private-routing-service.md',
     },
diff --git a/lib/rules/require-computed-macros.js b/lib/rules/require-computed-macros.js
index cea21854..d204c1fc 100644
--- a/lib/rules/require-computed-macros.js
+++ b/lib/rules/require-computed-macros.js
@@ -82,7 +82,7 @@ module.exports = {
     docs: {
       description: 'require using computed property macros when possible',
       category: 'Computed Properties',
-      recommended: false,
+      recommended: true,
       url:
         'https://github.com/ember-cli/eslint-plugin-ember/tree/master/docs/rules/require-computed-macros.md',
     },
diff --git a/lib/rules/require-computed-property-dependencies.js b/lib/rules/require-computed-property-dependencies.js
index 31bfabfd..692979eb 100644
--- a/lib/rules/require-computed-property-dependencies.js
+++ b/lib/rules/require-computed-property-dependencies.js
@@ -356,7 +356,7 @@ module.exports = {
     docs: {
       description: 'require dependencies to be declared statically in computed properties',
       category: 'Computed Properties',
-      recommended: false,
+      recommended: true,
       url:
         'https://github.com/ember-cli/eslint-plugin-ember/tree/master/docs/rules/require-computed-property-dependencies.md',
     },
diff --git a/lib/rules/use-ember-data-rfc-395-imports.js b/lib/rules/use-ember-data-rfc-395-imports.js
index d666f625..b45cf06b 100644
--- a/lib/rules/use-ember-data-rfc-395-imports.js
+++ b/lib/rules/use-ember-data-rfc-395-imports.js
@@ -66,7 +66,7 @@ module.exports = {
     docs: {
       description: 'enforce usage of `@ember-data/` package imports instead `ember-data`',
       category: 'Ember Data',
-      recommended: false,
+      recommended: true,
       url:
         'https://github.com/ember-cli/eslint-plugin-ember/tree/master/docs/rules/use-ember-data-rfc-395-imports.md',
     },


Test patch:
diff --git a/lib/rules/no-legacy-test-waiters.js b/lib/rules/no-legacy-test-waiters.js
index 6a1cee62..2b34a525 100644
--- a/lib/rules/no-legacy-test-waiters.js
+++ b/lib/rules/no-legacy-test-waiters.js
@@ -11,7 +11,7 @@ module.exports = {
     docs: {
       description: 'disallow the use of the legacy test waiter APIs',
       category: 'Testing',
-      recommended: false,
+      recommended: true,
       url:
         'https://github.com/ember-cli/eslint-plugin-ember/tree/master/docs/rules/no-legacy-test-waiters.md',
     },
diff --git a/lib/rules/no-pause-test.js b/lib/rules/no-pause-test.js
index f1135208..e054b81f 100644
--- a/lib/rules/no-pause-test.js
+++ b/lib/rules/no-pause-test.js
@@ -15,7 +15,7 @@ module.exports = {
     docs: {
       description: 'disallow usage of the `pauseTest` helper in tests',
       category: 'Testing',
-      recommended: false,
+      recommended: true,
       url:
         'https://github.com/ember-cli/eslint-plugin-ember/tree/master/docs/rules/no-pause-test.md',
     },
diff --git a/lib/rules/no-test-and-then.js b/lib/rules/no-test-and-then.js
index 157bf6c8..812d2b26 100644
--- a/lib/rules/no-test-and-then.js
+++ b/lib/rules/no-test-and-then.js
@@ -15,7 +15,7 @@ module.exports = {
     docs: {
       description: 'disallow usage of the `andThen` test wait helper',
       category: 'Testing',
-      recommended: false,
+      recommended: true,
       url:
         'https://github.com/ember-cli/eslint-plugin-ember/tree/master/docs/rules/no-test-and-then.md',
     },
diff --git a/lib/rules/no-test-import-export.js b/lib/rules/no-test-import-export.js
index 3c289180..c3f6f883 100644
--- a/lib/rules/no-test-import-export.js
+++ b/lib/rules/no-test-import-export.js
@@ -17,7 +17,7 @@ module.exports = {
     docs: {
       description: 'disallow importing of "-test.js" in a test file and exporting from a test file',
       category: 'Testing',
-      recommended: false,
+      recommended: true,
       url:
         'https://github.com/ember-cli/eslint-plugin-ember/tree/master/docs/rules/no-test-import-export.md',
     },
diff --git a/lib/rules/no-test-module-for.js b/lib/rules/no-test-module-for.js
index 28a262f4..396143b3 100644
--- a/lib/rules/no-test-module-for.js
+++ b/lib/rules/no-test-module-for.js
@@ -17,7 +17,7 @@ module.exports = {
     docs: {
       description: 'disallow usage of `moduleFor`, `moduleForComponent`, etc',
       category: 'Testing',
-      recommended: false,
+      recommended: true,
       url:
         'https://github.com/ember-cli/eslint-plugin-ember/tree/master/docs/rules/no-test-module-for.md',
     },
diff --git a/tests/__snapshots__/recommended.js.snap b/tests/__snapshots__/recommended.js.snap
index 54fc006a..c8fa907b 100644
--- a/tests/__snapshots__/recommended.js.snap
+++ b/tests/__snapshots__/recommended.js.snap
@@ -15,21 +15,37 @@ Array [
   "no-duplicate-dependent-keys",
   "no-ember-super-in-es-classes",
   "no-ember-testing-in-module-scope",
+  "no-empty-attrs",
   "no-function-prototype-extensions",
+  "no-get-with-default",
+  "no-get",
   "no-global-jquery",
   "no-incorrect-calls-with-inline-anonymous-functions",
+  "no-incorrect-computed-macros",
   "no-invalid-debug-function-arguments",
+  "no-invalid-dependent-keys",
+  "no-jquery",
+  "no-legacy-test-waiters",
+  "no-mixins",
   "no-new-mixins",
   "no-observers",
   "no-old-shims",
   "no-on-calls-in-components",
+  "no-pause-test",
+  "no-private-routing-service",
   "no-restricted-resolver-tests",
   "no-side-effects",
+  "no-test-and-then",
+  "no-test-import-export",
+  "no-test-module-for",
   "no-unnecessary-route-path-option",
   "no-volatile-computed-properties",
+  "require-computed-macros",
+  "require-computed-property-dependencies",
   "require-return-from-computed",
   "require-super-in-init",
   "routes-segments-snake-case",
   "use-brace-expansion",
+  "use-ember-data-rfc-395-imports",
 ]
 `;