@typescript-eslint/eslint-plugin 6.7.1-alpha.2 → 6.7.1-alpha.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,7 +9,7 @@ description: 'Enforce using the nullish coalescing operator instead of logical a
9
9
  The `??` nullish coalescing runtime operator allows providing a default value when dealing with `null` or `undefined`.
10
10
  Because the nullish coalescing operator _only_ coalesces when the original value is `null` or `undefined`, it is much safer than relying upon logical OR operator chaining `||`, which coalesces on any _falsy_ value.
11
11
 
12
- This rule reports when you can safely replace:
12
+ This rule reports when you may consider replacing:
13
13
 
14
14
  - An `||` operator with `??`
15
15
  - An `||=` operator with `??=`
@@ -144,28 +144,28 @@ a ?? (b && c && d);
144
144
 
145
145
  ### `ignorePrimitives`
146
146
 
147
- If you would like to ignore certain primitive types that can be falsy then you may pass an object containing a boolean value for each primitive:
147
+ If you would like to ignore expressions containing operands of certain primitive types that can be falsy then you may pass an object containing a boolean value for each primitive:
148
148
 
149
149
  - `string: true`, ignores `null` or `undefined` unions with `string` (default: false).
150
150
  - `number: true`, ignores `null` or `undefined` unions with `number` (default: false).
151
151
  - `bigint: true`, ignores `null` or `undefined` unions with `bigint` (default: false).
152
152
  - `boolean: true`, ignores `null` or `undefined` unions with `boolean` (default: false).
153
153
 
154
- Incorrect code for `ignorePrimitives: { string: true }`, and correct code for `ignorePrimitives: { string: false }`:
154
+ Incorrect code for `ignorePrimitives: { string: false }`, and correct code for `ignorePrimitives: { string: true }`:
155
155
 
156
156
  ```ts
157
157
  const foo: string | undefined = 'bar';
158
158
  foo || 'a string';
159
159
  ```
160
160
 
161
- Correct code for `ignorePrimitives: { string: true }`:
161
+ Correct code for both `ignorePrimitives: { string: false }` and `ignorePrimitives: { string: true }`:
162
162
 
163
163
  ```ts
164
164
  const foo: string | undefined = 'bar';
165
165
  foo ?? 'a string';
166
166
  ```
167
167
 
168
- Also, if you would like to ignore all primitives types, you can set `ignorePrimitives: true`. It would be equivalent to `ignorePrimitives: { string: true, number: true, bigint: true, boolean: true }`.
168
+ Also, if you would like to ignore all primitives types, you can set `ignorePrimitives: true`. It is equivalent to `ignorePrimitives: { string: true, number: true, bigint: true, boolean: true }`.
169
169
 
170
170
  ## When Not To Use It
171
171
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@typescript-eslint/eslint-plugin",
3
- "version": "6.7.1-alpha.2+ac09e9c29",
3
+ "version": "6.7.1-alpha.5+7826910d8",
4
4
  "description": "TypeScript plugin for ESLint",
5
5
  "files": [
6
6
  "dist",
@@ -57,10 +57,10 @@
57
57
  },
58
58
  "dependencies": {
59
59
  "@eslint-community/regexpp": "^4.5.1",
60
- "@typescript-eslint/scope-manager": "6.7.1-alpha.2+ac09e9c29",
61
- "@typescript-eslint/type-utils": "6.7.1-alpha.2+ac09e9c29",
62
- "@typescript-eslint/utils": "6.7.1-alpha.2+ac09e9c29",
63
- "@typescript-eslint/visitor-keys": "6.7.1-alpha.2+ac09e9c29",
60
+ "@typescript-eslint/scope-manager": "6.7.1-alpha.5+7826910d8",
61
+ "@typescript-eslint/type-utils": "6.7.1-alpha.5+7826910d8",
62
+ "@typescript-eslint/utils": "6.7.1-alpha.5+7826910d8",
63
+ "@typescript-eslint/visitor-keys": "6.7.1-alpha.5+7826910d8",
64
64
  "debug": "^4.3.4",
65
65
  "graphemer": "^1.4.0",
66
66
  "ignore": "^5.2.4",
@@ -74,7 +74,7 @@
74
74
  "@types/natural-compare": "*",
75
75
  "@types/prettier": "*",
76
76
  "@typescript-eslint/rule-schema-to-typescript-types": "6.7.0",
77
- "@typescript-eslint/rule-tester": "6.7.1-alpha.2+ac09e9c29",
77
+ "@typescript-eslint/rule-tester": "6.7.1-alpha.5+7826910d8",
78
78
  "ajv": "^6.12.6",
79
79
  "chalk": "^5.3.0",
80
80
  "cross-fetch": "*",
@@ -103,5 +103,5 @@
103
103
  "type": "opencollective",
104
104
  "url": "https://opencollective.com/typescript-eslint"
105
105
  },
106
- "gitHead": "ac09e9c298ac11fcacb0f8c2987134e757254618"
106
+ "gitHead": "7826910d8c6ba4d2d40b8d55fcf7fd39fe290d88"
107
107
  }