Skip to content

Commit ea6f300

Browse files
committed
Change forbid wording everywhere
1 parent 28e369c commit ea6f300

8 files changed

+16
-16
lines changed

docs/rules/explicit-length-check.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ const isEmpty = 1 > foo.length;
4242
```
4343

4444
```js
45-
// Negative style is forbidden too
45+
// Negative style is disallowed too
4646
const isEmpty = !(foo.length > 0);
4747
```
4848

@@ -107,7 +107,7 @@ const isNotEmpty = Boolean(foo.length);
107107
```
108108

109109
```js
110-
// Negative style is forbidden too
110+
// Negative style is disallowed too
111111
const isNotEmpty = !(foo.length === 0);
112112
```
113113

docs/rules/no-array-method-this-argument.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
🔧💡 *This rule is [auto-fixable](https://eslint.org/docs/user-guide/command-line-interface#fixing-problems) and provides [suggestions](https://eslint.org/docs/developer-guide/working-with-rules#providing-suggestions).*
88
<!-- /RULE_NOTICE -->
99

10-
The rule forbids using the `thisArg` argument in array methods:
10+
The rule disallows using the `thisArg` argument in array methods:
1111

1212
- If the callback is an arrow function or a bound function, the `thisArg` won't affect it.
1313
- If you intent to use a custom `this` in the callback, it's better to use the variable directly or use `callback.bind(thisArg)`.

docs/rules/no-keyword-prefix.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const fooNew = 'foo';
2626

2727
### `disallowedPrefixes`
2828

29-
If you want a custom list of forbidden prefixes you can set them with `disallowedPrefixes`:
29+
If you want a custom list of disallowed prefixes you can set them with `disallowedPrefixes`:
3030

3131
```js
3232
// eslint unicorn/no-keyword-prefix: ["error", {"disallowedPrefixes": ["new", "for"]}]
@@ -55,7 +55,7 @@ foo.newFoo = 2; // pass
5555

5656
### `onlyCamelCase`
5757

58-
The default behavior is to check for camel case usage. If you want to forbid the prefix entirely, set `onlyCamelCase` to `false`:
58+
The default behavior is to check for camel case usage. If you want to disallow the prefix entirely, set `onlyCamelCase` to `false`:
5959

6060
```js
6161
// eslint unicorn/no-keyword-prefix: ["error", {"onlyCamelCase": true}]

docs/rules/no-lonely-if.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
🔧 *This rule is [auto-fixable](https://eslint.org/docs/user-guide/command-line-interface#fixing-problems).*
88
<!-- /RULE_NOTICE -->
99

10-
This rule adds onto the built-in [`no-lonely-if`](https://eslint.org/docs/rules/no-lonely-if) rule, which only forbids `if` statements in `else`, not in `if`. It is recommended to use `unicorn/no-lonely-if` together with the core ESLint `no-lonely-if` rule.
10+
This rule adds onto the built-in [`no-lonely-if`](https://eslint.org/docs/rules/no-lonely-if) rule, which only disallows `if` statements in `else`, not in `if`. It is recommended to use `unicorn/no-lonely-if` together with the core ESLint `no-lonely-if` rule.
1111

1212
## Fail
1313

docs/rules/no-useless-undefined.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ Type: `object`
9696
Type: `boolean`\
9797
Default: `true`
9898

99-
Forbid the use of `undefined` at the end of function call arguments. Pass `checkArguments: false` to disable checking them.
99+
Disallow the use of `undefined` at the end of function call arguments. Pass `checkArguments: false` to disable checking them.
100100

101101
#### Fail
102102

docs/rules/prefer-module.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@
99

1010
Prefer using the [JavaScript module](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules) format over the legacy CommonJS module format.
1111

12-
1. Forbids `'use strict'` directive.
12+
1. Disallows `'use strict'` directive.
1313

1414
JavaScript modules use “Strict Mode” by default.
1515

16-
1. Forbids “Global Return”.
16+
1. Disallows “Global Return”.
1717

1818
This is a CommonJS-only feature.
1919

20-
1. Forbids the global variables `__dirname` and `__filename`.
20+
1. Disallows the global variables `__dirname` and `__filename`.
2121

2222
They are [not available in JavaScript modules](https://nodejs.org/api/esm.html#esm_no_filename_or_dirname).
2323

@@ -45,11 +45,11 @@ Prefer using the [JavaScript module](https://developer.mozilla.org/en-US/docs/We
4545
const foo = new URL('foo.js', import.meta.url);
4646
```
4747

48-
1. Forbids `require(…)`.
48+
1. Disallows `require(…)`.
4949

5050
`require(…)` can be replaced by `import …` or `import(…)`.
5151

52-
1. Forbids `exports` and `module.exports`.
52+
1. Disallows `exports` and `module.exports`.
5353

5454
`export …` should be used in JavaScript modules.
5555

rules/prefer-modern-dom-apis.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const replaceChildOrInsertBeforeSelector = [
2323
'[callee.object.type="Identifier"]',
2424
].join('');
2525

26-
const forbiddenMethods = new Map([
26+
const disallowedMethods = new Map([
2727
['replaceChild', 'replaceWith'],
2828
['insertBefore', 'before'],
2929
]);
@@ -32,7 +32,7 @@ const checkForReplaceChildOrInsertBefore = (context, node) => {
3232
const method = node.callee.property.name;
3333
const parentNode = node.callee.object.name;
3434
const [newChildNode, oldChildNode] = node.arguments.map(({name}) => name);
35-
const preferredMethod = forbiddenMethods.get(method);
35+
const preferredMethod = disallowedMethods.get(method);
3636

3737
const fix = isValueNotUsable(node)
3838
? fixer => fixer.replaceText(

rules/prefer-query-selector.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const selector = [
1414
notDomNodeSelector('callee.object'),
1515
].join('');
1616

17-
const forbiddenIdentifierNames = new Map([
17+
const disallowedIdentifierNames = new Map([
1818
['getElementById', 'querySelector'],
1919
['getElementsByClassName', 'querySelectorAll'],
2020
['getElementsByTagName', 'querySelectorAll'],
@@ -103,7 +103,7 @@ const fix = (node, identifierName, preferredSelector) => {
103103
const create = () => ({
104104
[selector](node) {
105105
const method = node.callee.property.name;
106-
const preferredSelector = forbiddenIdentifierNames.get(method);
106+
const preferredSelector = disallowedIdentifierNames.get(method);
107107

108108
const problem = {
109109
node: node.callee.property,

0 commit comments

Comments
 (0)