You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/rules/named-functions-in-promises.md
+6-2
Original file line number
Diff line number
Diff line change
@@ -67,6 +67,10 @@ test('it reloads user in promise handler', function (assert) {
67
67
68
68
## Configuration
69
69
70
-
This rule takes an optional object containing:
70
+
<!-- begin auto-generated rule options list -->
71
71
72
-
-`boolean` -- `allowSimpleArrowFunction` -- (default false) setting to `true` allows arrow function expressions that do not have block bodies. These simple arrow functions must also only contain a single function call. For example: `.then(user => this._reloadUser(user))`.
|`allowSimpleArrowFunction`| Enabling allows arrow function expressions that do not have block bodies. These simple arrow functions must also only contain a single function call. For example: `.then(user => this._reloadUser(user))`. | Boolean |`false`|
Copy file name to clipboardExpand all lines: docs/rules/no-arrow-function-computed-properties.md
+6-2
Original file line number
Diff line number
Diff line change
@@ -38,9 +38,13 @@ const Person = EmberObject.extend({
38
38
39
39
## Configuration
40
40
41
-
This rule takes an optional object containing:
41
+
<!-- begin auto-generated rule options list -->
42
42
43
-
-`boolean` -- `onlyThisContexts` -- whether the rule should allow or disallow computed properties where the arrow function body does not contain a `this` reference (default: `false`)
|`onlyThisContexts`| Whether the rule should allow or disallow computed properties where the arrow function body does not contain a `this` reference. | Boolean |`false`|
-`string[]` -- `additionalClassImports` -- Allows you to specify additional imports that should be flagged to disallow calling `extend` on. This allows you to handle the case where your app or addon is importing from a module that performs the `extend`.
|`additionalClassImports`| Allows you to specify additional imports that should be flagged to disallow calling `extend` on. This allows you to handle the case where your app or addon is importing from a module that performs the `extend`. | String[]|
- boolean -- `allowControllerFor` -- whether the rule should allow or disallow routes from accessing the controller outside of `setupController`/`resetController` via `controllerFor` (default: `false`)
|`allowControllerFor`| Whether the rule should allow or disallow routes from accessing the controller outside of `setupController`/`resetController` via `controllerFor`. | Boolean |`false`|
Copy file name to clipboardExpand all lines: docs/rules/no-get-with-default.md
+7-3
Original file line number
Diff line number
Diff line change
@@ -44,10 +44,14 @@ const test = this.key || [];
44
44
45
45
## Configuration
46
46
47
-
This rule takes an optional object containing:
47
+
<!-- begin auto-generated rule options list -->
48
48
49
-
-`boolean` -- `catchSafeObjects` -- whether the rule should catch non-`this` imported usages like `getWithDefault(person, 'name', '')` (default `true`)
50
-
-`boolean` -- `catchUnsafeObjects` -- whether the rule should catch non-`this` usages like `person.getWithDefault('name', '')` even though we don't know for sure if `person` is an Ember object (default `true`)
|`catchSafeObjects`| Whether the rule should catch non-`this` imported usages like `getWithDefault(person, 'name', '')`. | Boolean |`true`|
52
+
|`catchUnsafeObjects`| Whether the rule should catch non-`this` usages like `person.getWithDefault('name', '')` even though we don't know for sure if `person` is an Ember object. | Boolean |`true`|
- `boolean` -- `ignoreGetProperties` -- whether the rule should ignore `getProperties` (default `false`)
97
-
- `boolean` -- `ignoreNestedPaths` -- whether the rule should ignore `this.get('some.nested.property')` (can't be enabled at the same time as `useOptionalChaining`) (default `false`)
98
-
- `boolean` -- `useAt` -- whether the rule should use `at(-1)` [Array.prototype.at()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/at) to replace `lastObject` (default `true`)
99
-
- `boolean` -- `useOptionalChaining` -- whether the rule should use the [optional chaining operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Optional_chaining) `?.` to autofix nested paths such as `this.get('some.nested.property')` to `this.some?.nested?.property` (when this option is off, these nested paths won't be autofixed at all) (default `true`)
100
-
- `boolean` -- `catchSafeObjects` -- whether the rule should catch non-`this` imported usages like `get(foo, 'bar')` (default `true`)
101
-
- `boolean` -- `catchUnsafeObjects` -- whether the rule should catch non-`this` usages like `foo.get('bar')` even though we don't know for sure if `foo` is an Ember object (default `false`)
| `catchSafeObjects` | Whether the rule should catch non-`this` imported usages like `get(foo, 'bar')`. | Boolean | `true` |
99
+
| `catchUnsafeObjects` | Whether the rule should catch non-`this` usages like `foo.get('bar')` even though we don't know for sure if `foo` is an Ember object. | Boolean | `false` |
100
+
| `ignoreGetProperties` | Whether the rule should ignore `getProperties`. | Boolean | `false` |
101
+
| `ignoreNestedPaths` | Whether the rule should ignore `this.get('some.nested.property')` (can't be enabled at the same time as `useOptionalChaining`). | Boolean | `false` |
102
+
| `useAt` | Whether the rule should use `at(-1)` [Array.prototype.at()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/at) to replace `lastObject`. | Boolean | `true` |
103
+
| `useOptionalChaining` | Whether the rule should use the [optional chaining operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Optional_chaining) `?.` to autofix nested paths such as `this.get('some.nested.property')` to `this.some?.nested?.property` (when this option is off, these nested paths won't be autofixed at all). | Boolean | `true` |
-`String[]` -- `properties` -- array of names of properties that should not be modified (modifying child/nested/sub-properties of these is also not allowed)
|`properties`| Array of names of properties that should not be modified (modifying child/nested/sub-properties of these is also not allowed). | String[]| Yes |
64
+
65
+
<!-- end auto-generated rule options list -->
61
66
62
67
Not yet implemented: There is currently no way to configure whether sub-properties are restricted from modification. To make this configurable, the `properties` array option could be updated to also accept objects of the form `{ name: 'myPropertyName', includeSubProperties: false }` where `includeSubProperties` defaults to `true`.
Copy file name to clipboardExpand all lines: docs/rules/no-restricted-service-injections.md
+11-4
Original file line number
Diff line number
Diff line change
@@ -45,10 +45,17 @@ class MyComponent extends Component {
45
45
46
46
## Configuration
47
47
48
-
- object[] -- containing the following properties:
49
-
- string[] -- `services` -- list of (kebab-case) service names that should be disallowed from being injected under the specified paths
50
-
- string[] -- `paths` -- optional list of regexp file paths that injecting the specified services should be disallowed under (omit this field to match any path) (for glob patterns, use [ESLint `overrides`](https://eslint.org/docs/latest/user-guide/configuring/configuration-files#configuration-based-on-glob-patterns) instead)
51
-
- string -- `message` -- optional custom error message to display for violations
48
+
Accepts an array of the objects with the following options:
|`message`| Optional custom error message to display for violations. | String ||
55
+
|`paths`| Optional list of regexp file paths that injecting the specified services should be disallowed under (omit this field to match any path) (for glob patterns, use [ESLint `overrides`](https://eslint.org/docs/latest/user-guide/configuring/configuration-files#configuration-based-on-glob-patterns) instead). | String[]||
56
+
|`services`| List of (kebab-case) service names that should be disallowed from being injected under the specified paths. | String[]| Yes |
If you have `@ember/runloop` functions that you wish to allow, you can configure this rule to allow specific methods. The configuration takes an object with the `allowList` property, which is an array of strings where the strings must be names of runloop functions.
|`allowList`| If you have `@ember/runloop` functions that you wish to allow, you can configure this rule to allow specific methods. The configuration takes an object with the `allowList` property, which is an array of strings where the strings must be names of runloop functions. | String[]|
0 commit comments