@typescript-eslint/eslint-plugin 7.8.0 → 7.8.1-alpha.0
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.
|
@@ -114,11 +114,11 @@ if (someNullCondition !== false) {
|
|
|
114
114
|
|
|
115
115
|
```ts option='{ "allowComparingNullableBooleansToFalse": false }'
|
|
116
116
|
declare const someUndefinedCondition: boolean | undefined;
|
|
117
|
-
if (someUndefinedCondition ?? true) {
|
|
117
|
+
if (!(someUndefinedCondition ?? true)) {
|
|
118
118
|
}
|
|
119
119
|
|
|
120
120
|
declare const someNullCondition: boolean | null;
|
|
121
|
-
if (
|
|
121
|
+
if (someNullCondition ?? true) {
|
|
122
122
|
}
|
|
123
123
|
```
|
|
124
124
|
|
|
@@ -127,16 +127,16 @@ if (!(someNullCondition ?? true)) {
|
|
|
127
127
|
|
|
128
128
|
## Fixer
|
|
129
129
|
|
|
130
|
-
|
|
|
131
|
-
|
|
|
132
|
-
|
|
|
133
|
-
|
|
|
134
|
-
|
|
|
135
|
-
|
|
|
136
|
-
|
|
|
137
|
-
|
|
|
138
|
-
|
|
|
139
|
-
|
|
|
130
|
+
| Comparison | Fixer Output | Notes |
|
|
131
|
+
| :----------------------------: | ------------------------------- | ----------------------------------------------------------------------------------- |
|
|
132
|
+
| `booleanVar === true` | `booleanVar` | |
|
|
133
|
+
| `booleanVar !== true` | `!booleanVar` | |
|
|
134
|
+
| `booleanVar === false` | `!booleanVar` | |
|
|
135
|
+
| `booleanVar !== false` | `booleanVar` | |
|
|
136
|
+
| `nullableBooleanVar === true` | `nullableBooleanVar` | Only checked/fixed if the `allowComparingNullableBooleansToTrue` option is `false` |
|
|
137
|
+
| `nullableBooleanVar !== true` | `!nullableBooleanVar` | Only checked/fixed if the `allowComparingNullableBooleansToTrue` option is `false` |
|
|
138
|
+
| `nullableBooleanVar === false` | `!(nullableBooleanVar ?? true)` | Only checked/fixed if the `allowComparingNullableBooleansToFalse` option is `false` |
|
|
139
|
+
| `nullableBooleanVar !== false` | `nullableBooleanVar ?? true` | Only checked/fixed if the `allowComparingNullableBooleansToFalse` option is `false` |
|
|
140
140
|
|
|
141
141
|
## When Not To Use It
|
|
142
142
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@typescript-eslint/eslint-plugin",
|
|
3
|
-
"version": "7.8.0",
|
|
3
|
+
"version": "7.8.1-alpha.0",
|
|
4
4
|
"description": "TypeScript plugin for ESLint",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -62,10 +62,10 @@
|
|
|
62
62
|
},
|
|
63
63
|
"dependencies": {
|
|
64
64
|
"@eslint-community/regexpp": "^4.10.0",
|
|
65
|
-
"@typescript-eslint/scope-manager": "7.8.0",
|
|
66
|
-
"@typescript-eslint/type-utils": "7.8.0",
|
|
67
|
-
"@typescript-eslint/utils": "7.8.0",
|
|
68
|
-
"@typescript-eslint/visitor-keys": "7.8.0",
|
|
65
|
+
"@typescript-eslint/scope-manager": "7.8.1-alpha.0",
|
|
66
|
+
"@typescript-eslint/type-utils": "7.8.1-alpha.0",
|
|
67
|
+
"@typescript-eslint/utils": "7.8.1-alpha.0",
|
|
68
|
+
"@typescript-eslint/visitor-keys": "7.8.1-alpha.0",
|
|
69
69
|
"debug": "^4.3.4",
|
|
70
70
|
"graphemer": "^1.4.0",
|
|
71
71
|
"ignore": "^5.3.1",
|
|
@@ -78,8 +78,8 @@
|
|
|
78
78
|
"@types/marked": "*",
|
|
79
79
|
"@types/mdast": "^4.0.3",
|
|
80
80
|
"@types/natural-compare": "*",
|
|
81
|
-
"@typescript-eslint/rule-schema-to-typescript-types": "7.8.0",
|
|
82
|
-
"@typescript-eslint/rule-tester": "7.8.0",
|
|
81
|
+
"@typescript-eslint/rule-schema-to-typescript-types": "7.8.1-alpha.0",
|
|
82
|
+
"@typescript-eslint/rule-tester": "7.8.1-alpha.0",
|
|
83
83
|
"ajv": "^6.12.6",
|
|
84
84
|
"chalk": "^5.3.0",
|
|
85
85
|
"cross-env": "^7.0.3",
|