eslint-plugin-ember
Advanced tools
@@ -157,2 +157,20 @@ 'use strict'; | ||
}, | ||
VariableDeclarator(node) { | ||
if (!currentRouteNode) { | ||
return; | ||
} | ||
if (node.init.type !== 'ThisExpression' || node.id.type !== 'ObjectPattern') { | ||
return; | ||
} | ||
const controllerProperty = node.id.properties.find( | ||
(prop) => prop.key.type === 'Identifier' && prop.key.name === 'controller' | ||
); | ||
if (controllerProperty) { | ||
// Example: const { controller } = this; | ||
context.report({ node: controllerProperty, message: ERROR_MESSAGE }); | ||
} | ||
}, | ||
}; | ||
@@ -159,0 +177,0 @@ }, |
@@ -81,2 +81,6 @@ 'use strict'; | ||
'FunctionExpression:exit'(node) { | ||
if (node.parent.parent.parent === null) { | ||
return; | ||
} | ||
if ( | ||
@@ -83,0 +87,0 @@ ember.isComputedProp(node.parent, importedEmberName, importedComputedName) || |
{ | ||
"name": "eslint-plugin-ember", | ||
"version": "10.5.1", | ||
"version": "10.5.2", | ||
"description": "Eslint plugin for Ember.js apps", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
176
README.md
@@ -50,3 +50,3 @@ # eslint-plugin-ember | ||
| | [base](./lib/config/base.js) | contains no rules settings, but the basic eslint configuration suitable for any ember project. You can use it to configure rules as you wish. | | ||
| :white_check_mark: | [recommended](./lib/recommended-rules.js) | extends the `base` configuration by enabling the recommended rules. | | ||
| β | [recommended](./lib/recommended-rules.js) | extends the `base` configuration by enabling the recommended rules. | | ||
@@ -58,3 +58,3 @@ ## π Rules | ||
- What configuration it belongs to | ||
- :wrench: if some problems reported by the rule are automatically fixable by the `--fix` [command line](https://eslint.org/docs/user-guide/command-line-interface#fixing-problems) option | ||
- π§ if some problems reported by the rule are automatically fixable by the `--fix` [command line](https://eslint.org/docs/user-guide/command-line-interface#fixing-problems) option | ||
- π‘ if some problems reported by the rule are manually fixable by editor [suggestions](https://eslint.org/docs/developer-guide/working-with-rules#providing-suggestions) | ||
@@ -66,36 +66,36 @@ | ||
| Name | Description | :white_check_mark: | :wrench: | π‘ | | ||
| Name | Description | β | π§ | π‘ | | ||
|:--------|:------------|:---------------|:-----------|:---------------| | ||
| [no-attrs-in-components](./docs/rules/no-attrs-in-components.md) | disallow usage of `this.attrs` in components | :white_check_mark: | | | | ||
| [no-attrs-snapshot](./docs/rules/no-attrs-snapshot.md) | disallow use of attrs snapshot in the `didReceiveAttrs` and `didUpdateAttrs` component hooks | :white_check_mark: | | | | ||
| [no-classic-components](./docs/rules/no-classic-components.md) | enforce using Glimmer components | :white_check_mark: | | | | ||
| [no-component-lifecycle-hooks](./docs/rules/no-component-lifecycle-hooks.md) | disallow usage of "classic" ember component lifecycle hooks. Render modifiers or custom functional modifiers should be used instead. | :white_check_mark: | | | | ||
| [no-on-calls-in-components](./docs/rules/no-on-calls-in-components.md) | disallow usage of `on` to call lifecycle hooks in components | :white_check_mark: | | | | ||
| [require-tagless-components](./docs/rules/require-tagless-components.md) | disallow using the wrapper element of a component | :white_check_mark: | | | | ||
| [no-attrs-in-components](./docs/rules/no-attrs-in-components.md) | disallow usage of `this.attrs` in components | β | | | | ||
| [no-attrs-snapshot](./docs/rules/no-attrs-snapshot.md) | disallow use of attrs snapshot in the `didReceiveAttrs` and `didUpdateAttrs` component hooks | β | | | | ||
| [no-classic-components](./docs/rules/no-classic-components.md) | enforce using Glimmer components | β | | | | ||
| [no-component-lifecycle-hooks](./docs/rules/no-component-lifecycle-hooks.md) | disallow usage of "classic" ember component lifecycle hooks. Render modifiers or custom functional modifiers should be used instead. | β | | | | ||
| [no-on-calls-in-components](./docs/rules/no-on-calls-in-components.md) | disallow usage of `on` to call lifecycle hooks in components | β | | | | ||
| [require-tagless-components](./docs/rules/require-tagless-components.md) | disallow using the wrapper element of a component | β | | | | ||
### Computed Properties | ||
| Name | Description | :white_check_mark: | :wrench: | π‘ | | ||
| Name | Description | β | π§ | π‘ | | ||
|:--------|:------------|:---------------|:-----------|:---------------| | ||
| [computed-property-getters](./docs/rules/computed-property-getters.md) | enforce the consistent use of getters in computed properties | | | | | ||
| [no-arrow-function-computed-properties](./docs/rules/no-arrow-function-computed-properties.md) | disallow arrow functions in computed properties | :white_check_mark: | | | | ||
| [no-assignment-of-untracked-properties-used-in-tracking-contexts](./docs/rules/no-assignment-of-untracked-properties-used-in-tracking-contexts.md) | disallow assignment of untracked properties that are used as computed property dependencies | :white_check_mark: | :wrench: | | | ||
| [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 | :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: | :wrench: | | | ||
| [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 | :white_check_mark: | | | | ||
| [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: | :wrench: | | | ||
| [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 | :white_check_mark: | | | | ||
| [no-arrow-function-computed-properties](./docs/rules/no-arrow-function-computed-properties.md) | disallow arrow functions in computed properties | β | | | | ||
| [no-assignment-of-untracked-properties-used-in-tracking-contexts](./docs/rules/no-assignment-of-untracked-properties-used-in-tracking-contexts.md) | disallow assignment of untracked properties that are used as computed property dependencies | β | π§ | | | ||
| [no-computed-properties-in-native-classes](./docs/rules/no-computed-properties-in-native-classes.md) | disallow using computed properties in native classes | β | | | | ||
| [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` | β | | | | ||
| [no-duplicate-dependent-keys](./docs/rules/no-duplicate-dependent-keys.md) | disallow repeating computed property dependent keys | β | π§ | | | ||
| [no-incorrect-computed-macros](./docs/rules/no-incorrect-computed-macros.md) | disallow incorrect usage of computed property macros | β | π§ | | | ||
| [no-invalid-dependent-keys](./docs/rules/no-invalid-dependent-keys.md) | disallow invalid dependent keys in computed properties | β | π§ | | | ||
| [no-side-effects](./docs/rules/no-side-effects.md) | disallow unexpected side effects in computed properties | β | | | | ||
| [no-volatile-computed-properties](./docs/rules/no-volatile-computed-properties.md) | disallow volatile computed properties | β | | | | ||
| [require-computed-macros](./docs/rules/require-computed-macros.md) | require using computed property macros when possible | β | π§ | | | ||
| [require-computed-property-dependencies](./docs/rules/require-computed-property-dependencies.md) | require dependencies to be declared statically in computed properties | β | π§ | | | ||
| [require-return-from-computed](./docs/rules/require-return-from-computed.md) | disallow missing return statements in computed properties | β | | | | ||
| [use-brace-expansion](./docs/rules/use-brace-expansion.md) | enforce usage of brace expansion in computed property dependent keys | β | | | | ||
### Controllers | ||
| Name | Description | :white_check_mark: | :wrench: | π‘ | | ||
| Name | Description | β | π§ | π‘ | | ||
|:--------|:------------|:---------------|:-----------|:---------------| | ||
| [alias-model-in-controller](./docs/rules/alias-model-in-controller.md) | enforce aliasing model in controllers | | | | | ||
| [avoid-using-needs-in-controllers](./docs/rules/avoid-using-needs-in-controllers.md) | disallow using `needs` in controllers | :white_check_mark: | | | | ||
| [avoid-using-needs-in-controllers](./docs/rules/avoid-using-needs-in-controllers.md) | disallow using `needs` in controllers | β | | | | ||
| [no-controllers](./docs/rules/no-controllers.md) | disallow non-essential controllers | | | | | ||
@@ -105,60 +105,60 @@ | ||
| Name | Description | :white_check_mark: | :wrench: | π‘ | | ||
| Name | Description | β | π§ | π‘ | | ||
|:--------|:------------|:---------------|:-----------|:---------------| | ||
| [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 | :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: | | | | ||
| [no-old-shims](./docs/rules/no-old-shims.md) | disallow usage of old shims for modules | :white_check_mark: | :wrench: | | | ||
| [no-string-prototype-extensions](./docs/rules/no-string-prototype-extensions.md) | disallow usage of `String` prototype extensions | :white_check_mark: | | | | ||
| [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-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 | β | | | | ||
| [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 | β | | | | ||
| [no-old-shims](./docs/rules/no-old-shims.md) | disallow usage of old shims for modules | β | π§ | | | ||
| [no-string-prototype-extensions](./docs/rules/no-string-prototype-extensions.md) | disallow usage of `String` prototype extensions | β | | | | ||
### Ember Data | ||
| Name | Description | :white_check_mark: | :wrench: | π‘ | | ||
| Name | Description | β | π§ | π‘ | | ||
|:--------|:------------|:---------------|:-----------|:---------------| | ||
| [no-empty-attrs](./docs/rules/no-empty-attrs.md) | disallow usage of empty attributes in Ember Data models | | | | | ||
| [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: | :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 | ||
| Name | Description | :white_check_mark: | :wrench: | π‘ | | ||
| Name | Description | β | π§ | π‘ | | ||
|:--------|:------------|:---------------|:-----------|:---------------| | ||
| [avoid-leaking-state-in-ember-objects](./docs/rules/avoid-leaking-state-in-ember-objects.md) | disallow state leakage | :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 | :white_check_mark: | :wrench: | | | ||
| [avoid-leaking-state-in-ember-objects](./docs/rules/avoid-leaking-state-in-ember-objects.md) | disallow state leakage | β | | | | ||
| [no-get-with-default](./docs/rules/no-get-with-default.md) | disallow usage of the Ember's `getWithDefault` function | β | π§ | | | ||
| [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 | | | | | ||
| [no-try-invoke](./docs/rules/no-try-invoke.md) | disallow usage of the Ember's `tryInvoke` util | :white_check_mark: | | | | ||
| [require-super-in-lifecycle-hooks](./docs/rules/require-super-in-lifecycle-hooks.md) | require super to be called in lifecycle hooks | :white_check_mark: | :wrench: | | | ||
| [use-ember-get-and-set](./docs/rules/use-ember-get-and-set.md) | enforce usage of `Ember.get` and `Ember.set` | | :wrench: | | | ||
| [no-try-invoke](./docs/rules/no-try-invoke.md) | disallow usage of the Ember's `tryInvoke` util | β | | | | ||
| [require-super-in-lifecycle-hooks](./docs/rules/require-super-in-lifecycle-hooks.md) | require super to be called in lifecycle hooks | β | π§ | | | ||
| [use-ember-get-and-set](./docs/rules/use-ember-get-and-set.md) | enforce usage of `Ember.get` and `Ember.set` | | π§ | | | ||
### Ember Octane | ||
| Name | Description | :white_check_mark: | :wrench: | π‘ | | ||
| Name | Description | β | π§ | π‘ | | ||
|:--------|:------------|:---------------|:-----------|:---------------| | ||
| [classic-decorator-hooks](./docs/rules/classic-decorator-hooks.md) | enforce using correct hooks for both classic and non-classic classes | :white_check_mark: | | | | ||
| [classic-decorator-no-classic-methods](./docs/rules/classic-decorator-no-classic-methods.md) | disallow usage of classic APIs such as `get`/`set` in classes that aren't explicitly decorated with `@classic` | :white_check_mark: | | | | ||
| [no-actions-hash](./docs/rules/no-actions-hash.md) | disallow the actions hash in components, controllers, and routes | :white_check_mark: | | | | ||
| [no-classic-classes](./docs/rules/no-classic-classes.md) | disallow "classic" classes in favor of native JS classes | :white_check_mark: | | | | ||
| [no-ember-super-in-es-classes](./docs/rules/no-ember-super-in-es-classes.md) | disallow use of `this._super` in ES class methods | :white_check_mark: | :wrench: | | | ||
| [no-empty-glimmer-component-classes](./docs/rules/no-empty-glimmer-component-classes.md) | disallow empty backing classes for Glimmer components | :white_check_mark: | | | | ||
| [classic-decorator-hooks](./docs/rules/classic-decorator-hooks.md) | enforce using correct hooks for both classic and non-classic classes | β | | | | ||
| [classic-decorator-no-classic-methods](./docs/rules/classic-decorator-no-classic-methods.md) | disallow usage of classic APIs such as `get`/`set` in classes that aren't explicitly decorated with `@classic` | β | | | | ||
| [no-actions-hash](./docs/rules/no-actions-hash.md) | disallow the actions hash in components, controllers, and routes | β | | | | ||
| [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 | β | | | | ||
### jQuery | ||
| Name | Description | :white_check_mark: | :wrench: | π‘ | | ||
| Name | Description | β | π§ | π‘ | | ||
|:--------|:------------|:---------------|:-----------|:---------------| | ||
| [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 | :white_check_mark: | | | | ||
| [no-jquery](./docs/rules/no-jquery.md) | disallow any usage of jQuery | :white_check_mark: | | | | ||
| [jquery-ember-run](./docs/rules/jquery-ember-run.md) | disallow usage of jQuery without an Ember run loop | β | | | | ||
| [no-global-jquery](./docs/rules/no-global-jquery.md) | disallow usage of global jQuery object | β | | | | ||
| [no-jquery](./docs/rules/no-jquery.md) | disallow any usage of jQuery | β | | | | ||
### Miscellaneous | ||
| Name | Description | :white_check_mark: | :wrench: | π‘ | | ||
| Name | Description | β | π§ | π‘ | | ||
|:--------|:------------|:---------------|:-----------|:---------------| | ||
| [named-functions-in-promises](./docs/rules/named-functions-in-promises.md) | enforce usage of named functions in promises | | | | | ||
| [no-html-safe](./docs/rules/no-html-safe.md) | disallow the use of `htmlSafe` | | | | | ||
| [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` | :white_check_mark: | | | | ||
| [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. | :white_check_mark: | | | | ||
| [no-restricted-property-modifications](./docs/rules/no-restricted-property-modifications.md) | disallow modifying the specified properties | | :wrench: | | | ||
| [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 | | π§ | | | ||
| [require-fetch-import](./docs/rules/require-fetch-import.md) | enforce explicit import for `fetch()` | | | | | ||
@@ -168,20 +168,20 @@ | ||
| Name | Description | :white_check_mark: | :wrench: | π‘ | | ||
| Name | Description | β | π§ | π‘ | | ||
|:--------|:------------|:---------------|:-----------|:---------------| | ||
| [no-capital-letters-in-routes](./docs/rules/no-capital-letters-in-routes.md) | disallow routes with uppercased letters in router.js | :white_check_mark: | | | | ||
| [no-controller-access-in-routes](./docs/rules/no-controller-access-in-routes.md) | disallow routes from accessing the controller outside of setupController/resetController | :white_check_mark: | | | | ||
| [no-private-routing-service](./docs/rules/no-private-routing-service.md) | disallow injecting the private routing service | :white_check_mark: | | | | ||
| [no-shadow-route-definition](./docs/rules/no-shadow-route-definition.md) | enforce no route path definition shadowing | :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-controller-access-in-routes](./docs/rules/no-controller-access-in-routes.md) | disallow routes from accessing the controller outside of setupController/resetController | β | | | | ||
| [no-private-routing-service](./docs/rules/no-private-routing-service.md) | disallow injecting the private routing service | β | | | | ||
| [no-shadow-route-definition](./docs/rules/no-shadow-route-definition.md) | enforce no route path definition shadowing | β | | | | ||
| [no-unnecessary-index-route](./docs/rules/no-unnecessary-index-route.md) | disallow unnecessary `index` route definition | | | | | ||
| [no-unnecessary-route-path-option](./docs/rules/no-unnecessary-route-path-option.md) | disallow unnecessary usage of the route `path` option | :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 | | | π‘ | | ||
| [routes-segments-snake-case](./docs/rules/routes-segments-snake-case.md) | enforce usage of snake_cased dynamic segments in routes | :white_check_mark: | | | | ||
| [routes-segments-snake-case](./docs/rules/routes-segments-snake-case.md) | enforce usage of snake_cased dynamic segments in routes | β | | | | ||
### Services | ||
| Name | Description | :white_check_mark: | :wrench: | π‘ | | ||
| Name | Description | β | π§ | π‘ | | ||
|:--------|:------------|:---------------|:-----------|:---------------| | ||
| [no-implicit-service-injection-argument](./docs/rules/no-implicit-service-injection-argument.md) | disallow omitting the injected service name argument | | :wrench: | | | ||
| [no-implicit-service-injection-argument](./docs/rules/no-implicit-service-injection-argument.md) | disallow omitting the injected service name argument | | π§ | | | ||
| [no-restricted-service-injections](./docs/rules/no-restricted-service-injections.md) | disallow injecting certain services under certain paths | | | | | ||
| [no-unnecessary-service-injection-argument](./docs/rules/no-unnecessary-service-injection-argument.md) | disallow unnecessary argument when injecting services | | :wrench: | | | ||
| [no-unnecessary-service-injection-argument](./docs/rules/no-unnecessary-service-injection-argument.md) | disallow unnecessary argument when injecting services | | π§ | | | ||
| [no-unused-services](./docs/rules/no-unused-services.md) | disallow unused service injections (see rule doc for limitations) | | | π‘ | | ||
@@ -191,29 +191,29 @@ | ||
| Name | Description | :white_check_mark: | :wrench: | π‘ | | ||
| Name | Description | β | π§ | π‘ | | ||
|:--------|:------------|:---------------|:-----------|:---------------| | ||
| [order-in-components](./docs/rules/order-in-components.md) | enforce proper order of properties in components | | :wrench: | | | ||
| [order-in-controllers](./docs/rules/order-in-controllers.md) | enforce proper order of properties in controllers | | :wrench: | | | ||
| [order-in-models](./docs/rules/order-in-models.md) | enforce proper order of properties in models | | :wrench: | | | ||
| [order-in-routes](./docs/rules/order-in-routes.md) | enforce proper order of properties in routes | | :wrench: | | | ||
| [order-in-components](./docs/rules/order-in-components.md) | enforce proper order of properties in components | | π§ | | | ||
| [order-in-controllers](./docs/rules/order-in-controllers.md) | enforce proper order of properties in controllers | | π§ | | | ||
| [order-in-models](./docs/rules/order-in-models.md) | enforce proper order of properties in models | | π§ | | | ||
| [order-in-routes](./docs/rules/order-in-routes.md) | enforce proper order of properties in routes | | π§ | | | ||
### Testing | ||
| Name | Description | :white_check_mark: | :wrench: | π‘ | | ||
| Name | Description | β | π§ | π‘ | | ||
|:--------|:------------|:---------------|:-----------|:---------------| | ||
| [no-current-route-name](./docs/rules/no-current-route-name.md) | disallow usage of the `currentRouteName()` test helper | | | | | ||
| [no-ember-testing-in-module-scope](./docs/rules/no-ember-testing-in-module-scope.md) | disallow use of `Ember.testing` in module scope | :white_check_mark: | | | | ||
| [no-invalid-test-waiters](./docs/rules/no-invalid-test-waiters.md) | disallow incorrect usage of test waiter APIs | :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-noop-setup-on-error-in-before](./docs/rules/no-noop-setup-on-error-in-before.md) | disallows using no-op setupOnerror in `before` or `beforeEach` | :white_check_mark: | :wrench: | | | ||
| [no-pause-test](./docs/rules/no-pause-test.md) | disallow usage of the `pauseTest` helper in tests | :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-noop-setup-on-error-in-before](./docs/rules/no-noop-setup-on-error-in-before.md) | disallows using no-op setupOnerror in `before` or `beforeEach` | β | π§ | | | ||
| [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 | | | | | ||
| [no-restricted-resolver-tests](./docs/rules/no-restricted-resolver-tests.md) | disallow the use of patterns that use the restricted resolver in tests | :white_check_mark: | | | | ||
| [no-settled-after-test-helper](./docs/rules/no-settled-after-test-helper.md) | disallow usage of `await settled()` right after test helper that calls it internally | :white_check_mark: | :wrench: | | | ||
| [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 | :white_check_mark: | | | | ||
| [no-test-support-import](./docs/rules/no-test-support-import.md) | disallow importing of "test-support" files in production code. | :white_check_mark: | | | | ||
| [no-test-this-render](./docs/rules/no-test-this-render.md) | disallow usage of the `this.render` in tests, recommending to use @ember/test-helpers' `render` instead. | :white_check_mark: | | | | ||
| [prefer-ember-test-helpers](./docs/rules/prefer-ember-test-helpers.md) | enforce usage of `@ember/test-helpers` methods over native window methods | :white_check_mark: | | | | ||
| [require-valid-css-selector-in-test-helpers](./docs/rules/require-valid-css-selector-in-test-helpers.md) | disallow using invalid CSS selectors in test helpers | :white_check_mark: | :wrench: | | | ||
| [no-restricted-resolver-tests](./docs/rules/no-restricted-resolver-tests.md) | disallow the use of patterns that use the restricted resolver in tests | β | | | | ||
| [no-settled-after-test-helper](./docs/rules/no-settled-after-test-helper.md) | disallow usage of `await settled()` right after test helper that calls it internally | β | π§ | | | ||
| [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 | β | | | | ||
| [no-test-support-import](./docs/rules/no-test-support-import.md) | disallow importing of "test-support" files in production code. | β | | | | ||
| [no-test-this-render](./docs/rules/no-test-this-render.md) | disallow usage of the `this.render` in tests, recommending to use @ember/test-helpers' `render` instead. | β | | | | ||
| [prefer-ember-test-helpers](./docs/rules/prefer-ember-test-helpers.md) | enforce usage of `@ember/test-helpers` methods over native window methods | β | | | | ||
| [require-valid-css-selector-in-test-helpers](./docs/rules/require-valid-css-selector-in-test-helpers.md) | disallow using invalid CSS selectors in test helpers | β | π§ | | | ||
@@ -220,0 +220,0 @@ <!--RULES_TABLE_END--> |
11528
0.16%411960
-0.17%