@typescript-eslint/eslint-plugin 8.38.1-alpha.0 → 8.38.1-alpha.2
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.
- package/dist/configs/eslintrc/all.js +1 -1
- package/dist/configs/eslintrc/disable-type-checked.js +1 -1
- package/dist/configs/eslintrc/recommended-type-checked-only.js +1 -1
- package/dist/configs/eslintrc/recommended-type-checked.js +1 -1
- package/dist/configs/eslintrc/recommended.js +1 -1
- package/dist/configs/eslintrc/strict-type-checked-only.js +1 -1
- package/dist/configs/eslintrc/strict-type-checked.js +1 -1
- package/dist/configs/eslintrc/strict.js +1 -1
- package/dist/configs/eslintrc/stylistic-type-checked-only.js +1 -1
- package/dist/configs/eslintrc/stylistic-type-checked.js +1 -1
- package/dist/configs/eslintrc/stylistic.js +1 -1
- package/dist/configs/flat/all.js +1 -1
- package/dist/configs/flat/disable-type-checked.js +1 -1
- package/dist/configs/flat/recommended-type-checked-only.js +1 -1
- package/dist/configs/flat/recommended-type-checked.js +1 -1
- package/dist/configs/flat/recommended.js +1 -1
- package/dist/configs/flat/strict-type-checked-only.js +1 -1
- package/dist/configs/flat/strict-type-checked.js +1 -1
- package/dist/configs/flat/strict.js +1 -1
- package/dist/configs/flat/stylistic-type-checked-only.js +1 -1
- package/dist/configs/flat/stylistic-type-checked.js +1 -1
- package/dist/configs/flat/stylistic.js +1 -1
- package/dist/rules/prefer-optional-chain-utils/gatherLogicalOperands.d.ts.map +1 -1
- package/dist/rules/prefer-optional-chain-utils/gatherLogicalOperands.js +4 -2
- package/package.json +8 -8
@@ -4,7 +4,7 @@
|
|
4
4
|
// SEE https://typescript-eslint.io/users/configs
|
5
5
|
//
|
6
6
|
// For developers working in the typescript-eslint monorepo:
|
7
|
-
// You can regenerate it using `yarn generate
|
7
|
+
// You can regenerate it using `yarn generate-configs`
|
8
8
|
module.exports = {
|
9
9
|
extends: ['./configs/eslintrc/base', './configs/eslintrc/eslint-recommended'],
|
10
10
|
rules: {
|
@@ -4,7 +4,7 @@
|
|
4
4
|
// SEE https://typescript-eslint.io/users/configs
|
5
5
|
//
|
6
6
|
// For developers working in the typescript-eslint monorepo:
|
7
|
-
// You can regenerate it using `yarn generate
|
7
|
+
// You can regenerate it using `yarn generate-configs`
|
8
8
|
module.exports = {
|
9
9
|
parserOptions: { program: null, project: false, projectService: false },
|
10
10
|
rules: {
|
@@ -4,7 +4,7 @@
|
|
4
4
|
// SEE https://typescript-eslint.io/users/configs
|
5
5
|
//
|
6
6
|
// For developers working in the typescript-eslint monorepo:
|
7
|
-
// You can regenerate it using `yarn generate
|
7
|
+
// You can regenerate it using `yarn generate-configs`
|
8
8
|
module.exports = {
|
9
9
|
extends: ['./configs/eslintrc/base', './configs/eslintrc/eslint-recommended'],
|
10
10
|
rules: {
|
@@ -4,7 +4,7 @@
|
|
4
4
|
// SEE https://typescript-eslint.io/users/configs
|
5
5
|
//
|
6
6
|
// For developers working in the typescript-eslint monorepo:
|
7
|
-
// You can regenerate it using `yarn generate
|
7
|
+
// You can regenerate it using `yarn generate-configs`
|
8
8
|
module.exports = {
|
9
9
|
extends: ['./configs/eslintrc/base', './configs/eslintrc/eslint-recommended'],
|
10
10
|
rules: {
|
@@ -4,7 +4,7 @@
|
|
4
4
|
// SEE https://typescript-eslint.io/users/configs
|
5
5
|
//
|
6
6
|
// For developers working in the typescript-eslint monorepo:
|
7
|
-
// You can regenerate it using `yarn generate
|
7
|
+
// You can regenerate it using `yarn generate-configs`
|
8
8
|
module.exports = {
|
9
9
|
extends: ['./configs/eslintrc/base', './configs/eslintrc/eslint-recommended'],
|
10
10
|
rules: {
|
@@ -4,7 +4,7 @@
|
|
4
4
|
// SEE https://typescript-eslint.io/users/configs
|
5
5
|
//
|
6
6
|
// For developers working in the typescript-eslint monorepo:
|
7
|
-
// You can regenerate it using `yarn generate
|
7
|
+
// You can regenerate it using `yarn generate-configs`
|
8
8
|
module.exports = {
|
9
9
|
extends: ['./configs/eslintrc/base', './configs/eslintrc/eslint-recommended'],
|
10
10
|
rules: {
|
@@ -4,7 +4,7 @@
|
|
4
4
|
// SEE https://typescript-eslint.io/users/configs
|
5
5
|
//
|
6
6
|
// For developers working in the typescript-eslint monorepo:
|
7
|
-
// You can regenerate it using `yarn generate
|
7
|
+
// You can regenerate it using `yarn generate-configs`
|
8
8
|
module.exports = {
|
9
9
|
extends: ['./configs/eslintrc/base', './configs/eslintrc/eslint-recommended'],
|
10
10
|
rules: {
|
@@ -4,7 +4,7 @@
|
|
4
4
|
// SEE https://typescript-eslint.io/users/configs
|
5
5
|
//
|
6
6
|
// For developers working in the typescript-eslint monorepo:
|
7
|
-
// You can regenerate it using `yarn generate
|
7
|
+
// You can regenerate it using `yarn generate-configs`
|
8
8
|
module.exports = {
|
9
9
|
extends: ['./configs/eslintrc/base', './configs/eslintrc/eslint-recommended'],
|
10
10
|
rules: {
|
@@ -4,7 +4,7 @@
|
|
4
4
|
// SEE https://typescript-eslint.io/users/configs
|
5
5
|
//
|
6
6
|
// For developers working in the typescript-eslint monorepo:
|
7
|
-
// You can regenerate it using `yarn generate
|
7
|
+
// You can regenerate it using `yarn generate-configs`
|
8
8
|
module.exports = {
|
9
9
|
extends: ['./configs/eslintrc/base', './configs/eslintrc/eslint-recommended'],
|
10
10
|
rules: {
|
@@ -4,7 +4,7 @@
|
|
4
4
|
// SEE https://typescript-eslint.io/users/configs
|
5
5
|
//
|
6
6
|
// For developers working in the typescript-eslint monorepo:
|
7
|
-
// You can regenerate it using `yarn generate
|
7
|
+
// You can regenerate it using `yarn generate-configs`
|
8
8
|
module.exports = {
|
9
9
|
extends: ['./configs/eslintrc/base', './configs/eslintrc/eslint-recommended'],
|
10
10
|
rules: {
|
@@ -4,7 +4,7 @@
|
|
4
4
|
// SEE https://typescript-eslint.io/users/configs
|
5
5
|
//
|
6
6
|
// For developers working in the typescript-eslint monorepo:
|
7
|
-
// You can regenerate it using `yarn generate
|
7
|
+
// You can regenerate it using `yarn generate-configs`
|
8
8
|
module.exports = {
|
9
9
|
extends: ['./configs/eslintrc/base', './configs/eslintrc/eslint-recommended'],
|
10
10
|
rules: {
|
package/dist/configs/flat/all.js
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
// SEE https://typescript-eslint.io/users/configs
|
5
5
|
//
|
6
6
|
// For developers working in the typescript-eslint monorepo:
|
7
|
-
// You can regenerate it using `yarn generate
|
7
|
+
// You can regenerate it using `yarn generate-configs`
|
8
8
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
9
9
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
10
10
|
};
|
@@ -4,7 +4,7 @@
|
|
4
4
|
// SEE https://typescript-eslint.io/users/configs
|
5
5
|
//
|
6
6
|
// For developers working in the typescript-eslint monorepo:
|
7
|
-
// You can regenerate it using `yarn generate
|
7
|
+
// You can regenerate it using `yarn generate-configs`
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
9
9
|
/**
|
10
10
|
* A utility ruleset that will disable type-aware linting and all type-aware rules available in our project.
|
@@ -4,7 +4,7 @@
|
|
4
4
|
// SEE https://typescript-eslint.io/users/configs
|
5
5
|
//
|
6
6
|
// For developers working in the typescript-eslint monorepo:
|
7
|
-
// You can regenerate it using `yarn generate
|
7
|
+
// You can regenerate it using `yarn generate-configs`
|
8
8
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
9
9
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
10
10
|
};
|
@@ -4,7 +4,7 @@
|
|
4
4
|
// SEE https://typescript-eslint.io/users/configs
|
5
5
|
//
|
6
6
|
// For developers working in the typescript-eslint monorepo:
|
7
|
-
// You can regenerate it using `yarn generate
|
7
|
+
// You can regenerate it using `yarn generate-configs`
|
8
8
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
9
9
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
10
10
|
};
|
@@ -4,7 +4,7 @@
|
|
4
4
|
// SEE https://typescript-eslint.io/users/configs
|
5
5
|
//
|
6
6
|
// For developers working in the typescript-eslint monorepo:
|
7
|
-
// You can regenerate it using `yarn generate
|
7
|
+
// You can regenerate it using `yarn generate-configs`
|
8
8
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
9
9
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
10
10
|
};
|
@@ -4,7 +4,7 @@
|
|
4
4
|
// SEE https://typescript-eslint.io/users/configs
|
5
5
|
//
|
6
6
|
// For developers working in the typescript-eslint monorepo:
|
7
|
-
// You can regenerate it using `yarn generate
|
7
|
+
// You can regenerate it using `yarn generate-configs`
|
8
8
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
9
9
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
10
10
|
};
|
@@ -4,7 +4,7 @@
|
|
4
4
|
// SEE https://typescript-eslint.io/users/configs
|
5
5
|
//
|
6
6
|
// For developers working in the typescript-eslint monorepo:
|
7
|
-
// You can regenerate it using `yarn generate
|
7
|
+
// You can regenerate it using `yarn generate-configs`
|
8
8
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
9
9
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
10
10
|
};
|
@@ -4,7 +4,7 @@
|
|
4
4
|
// SEE https://typescript-eslint.io/users/configs
|
5
5
|
//
|
6
6
|
// For developers working in the typescript-eslint monorepo:
|
7
|
-
// You can regenerate it using `yarn generate
|
7
|
+
// You can regenerate it using `yarn generate-configs`
|
8
8
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
9
9
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
10
10
|
};
|
@@ -4,7 +4,7 @@
|
|
4
4
|
// SEE https://typescript-eslint.io/users/configs
|
5
5
|
//
|
6
6
|
// For developers working in the typescript-eslint monorepo:
|
7
|
-
// You can regenerate it using `yarn generate
|
7
|
+
// You can regenerate it using `yarn generate-configs`
|
8
8
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
9
9
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
10
10
|
};
|
@@ -4,7 +4,7 @@
|
|
4
4
|
// SEE https://typescript-eslint.io/users/configs
|
5
5
|
//
|
6
6
|
// For developers working in the typescript-eslint monorepo:
|
7
|
-
// You can regenerate it using `yarn generate
|
7
|
+
// You can regenerate it using `yarn generate-configs`
|
8
8
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
9
9
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
10
10
|
};
|
@@ -4,7 +4,7 @@
|
|
4
4
|
// SEE https://typescript-eslint.io/users/configs
|
5
5
|
//
|
6
6
|
// For developers working in the typescript-eslint monorepo:
|
7
|
-
// You can regenerate it using `yarn generate
|
7
|
+
// You can regenerate it using `yarn generate-configs`
|
8
8
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
9
9
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
10
10
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"gatherLogicalOperands.d.ts","sourceRoot":"","sources":["../../../src/rules/prefer-optional-chain-utils/gatherLogicalOperands.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iCAAiC,EACjC,QAAQ,EACT,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAYrE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAS/E,0BAAkB,eAAe;IAC/B,KAAK,UAAU;IACf,OAAO,YAAY;CACpB;AACD,0BAAkB,qBAAqB;IACrC,oCAAoC;IACpC,uBAAuB,4BAA4B;IACnD,oCAAoC;IACpC,oBAAoB,yBAAyB;IAE7C,mBAAmB;IACnB,kBAAkB,uBAAuB;IACzC,mBAAmB;IACnB,eAAe,oBAAoB;IAEnC,oDAAoD;IACpD,uBAAuB,4BAA4B;IACnD,oDAAoD;IACpD,oBAAoB,yBAAyB;IAE7C,WAAW;IACX,UAAU,eAAe;IACzB,UAAU;IACV,OAAO,YAAY;CACpB;AACD,MAAM,WAAW,YAAY;IAC3B,YAAY,EAAE,QAAQ,CAAC,IAAI,CAAC;IAC5B,cAAc,EAAE,qBAAqB,CAAC;IACtC,MAAM,EAAE,OAAO,CAAC;IAChB,IAAI,EAAE,QAAQ,CAAC,UAAU,CAAC;IAC1B,IAAI,EAAE,eAAe,CAAC,KAAK,CAAC;CAC7B;AACD,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,eAAe,CAAC,OAAO,CAAC;CAC/B;AACD,KAAK,OAAO,GAAG,cAAc,GAAG,YAAY,CAAC;AAwD7C,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,QAAQ,CAAC,iBAAiB,EAChC,cAAc,EAAE,iCAAiC,EACjD,UAAU,EAAE,QAAQ,CAAC,UAAU,CAAC,EAChC,OAAO,EAAE,0BAA0B,GAClC;IACD,iBAAiB,EAAE,GAAG,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC;IACnD,QAAQ,EAAE,OAAO,EAAE,CAAC;CACrB,
|
1
|
+
{"version":3,"file":"gatherLogicalOperands.d.ts","sourceRoot":"","sources":["../../../src/rules/prefer-optional-chain-utils/gatherLogicalOperands.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iCAAiC,EACjC,QAAQ,EACT,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAYrE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAS/E,0BAAkB,eAAe;IAC/B,KAAK,UAAU;IACf,OAAO,YAAY;CACpB;AACD,0BAAkB,qBAAqB;IACrC,oCAAoC;IACpC,uBAAuB,4BAA4B;IACnD,oCAAoC;IACpC,oBAAoB,yBAAyB;IAE7C,mBAAmB;IACnB,kBAAkB,uBAAuB;IACzC,mBAAmB;IACnB,eAAe,oBAAoB;IAEnC,oDAAoD;IACpD,uBAAuB,4BAA4B;IACnD,oDAAoD;IACpD,oBAAoB,yBAAyB;IAE7C,WAAW;IACX,UAAU,eAAe;IACzB,UAAU;IACV,OAAO,YAAY;CACpB;AACD,MAAM,WAAW,YAAY;IAC3B,YAAY,EAAE,QAAQ,CAAC,IAAI,CAAC;IAC5B,cAAc,EAAE,qBAAqB,CAAC;IACtC,MAAM,EAAE,OAAO,CAAC;IAChB,IAAI,EAAE,QAAQ,CAAC,UAAU,CAAC;IAC1B,IAAI,EAAE,eAAe,CAAC,KAAK,CAAC;CAC7B;AACD,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,eAAe,CAAC,OAAO,CAAC;CAC/B;AACD,KAAK,OAAO,GAAG,cAAc,GAAG,YAAY,CAAC;AAwD7C,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,QAAQ,CAAC,iBAAiB,EAChC,cAAc,EAAE,iCAAiC,EACjD,UAAU,EAAE,QAAQ,CAAC,UAAU,CAAC,EAChC,OAAO,EAAE,0BAA0B,GAClC;IACD,iBAAiB,EAAE,GAAG,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC;IACnD,QAAQ,EAAE,OAAO,EAAE,CAAC;CACrB,CA4PA"}
|
@@ -219,7 +219,8 @@ function gatherLogicalOperands(node, parserServices, sourceCode, options) {
|
|
219
219
|
}
|
220
220
|
case utils_1.AST_NODE_TYPES.UnaryExpression:
|
221
221
|
if (operand.operator === '!' &&
|
222
|
-
|
222
|
+
(!areMoreOperands ||
|
223
|
+
isValidFalseBooleanCheckType(operand.argument, node.operator === '||', parserServices, options))) {
|
223
224
|
result.push({
|
224
225
|
comparedName: operand.argument,
|
225
226
|
comparisonType: NullishComparisonType.NotBoolean,
|
@@ -236,7 +237,8 @@ function gatherLogicalOperands(node, parserServices, sourceCode, options) {
|
|
236
237
|
result.push({ type: OperandValidity.Invalid });
|
237
238
|
continue;
|
238
239
|
default:
|
239
|
-
if (
|
240
|
+
if (!areMoreOperands ||
|
241
|
+
isValidFalseBooleanCheckType(operand, node.operator === '&&', parserServices, options)) {
|
240
242
|
result.push({
|
241
243
|
comparedName: operand,
|
242
244
|
comparisonType: NullishComparisonType.Boolean,
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@typescript-eslint/eslint-plugin",
|
3
|
-
"version": "8.38.1-alpha.
|
3
|
+
"version": "8.38.1-alpha.2",
|
4
4
|
"description": "TypeScript plugin for ESLint",
|
5
5
|
"files": [
|
6
6
|
"dist",
|
@@ -59,10 +59,10 @@
|
|
59
59
|
},
|
60
60
|
"dependencies": {
|
61
61
|
"@eslint-community/regexpp": "^4.10.0",
|
62
|
-
"@typescript-eslint/scope-manager": "8.38.1-alpha.
|
63
|
-
"@typescript-eslint/type-utils": "8.38.1-alpha.
|
64
|
-
"@typescript-eslint/utils": "8.38.1-alpha.
|
65
|
-
"@typescript-eslint/visitor-keys": "8.38.1-alpha.
|
62
|
+
"@typescript-eslint/scope-manager": "8.38.1-alpha.2",
|
63
|
+
"@typescript-eslint/type-utils": "8.38.1-alpha.2",
|
64
|
+
"@typescript-eslint/utils": "8.38.1-alpha.2",
|
65
|
+
"@typescript-eslint/visitor-keys": "8.38.1-alpha.2",
|
66
66
|
"graphemer": "^1.4.0",
|
67
67
|
"ignore": "^7.0.0",
|
68
68
|
"natural-compare": "^1.4.0",
|
@@ -71,8 +71,8 @@
|
|
71
71
|
"devDependencies": {
|
72
72
|
"@types/mdast": "^4.0.3",
|
73
73
|
"@types/natural-compare": "*",
|
74
|
-
"@typescript-eslint/rule-schema-to-typescript-types": "8.38.1-alpha.
|
75
|
-
"@typescript-eslint/rule-tester": "8.38.1-alpha.
|
74
|
+
"@typescript-eslint/rule-schema-to-typescript-types": "8.38.1-alpha.2",
|
75
|
+
"@typescript-eslint/rule-tester": "8.38.1-alpha.2",
|
76
76
|
"@vitest/coverage-v8": "^3.1.3",
|
77
77
|
"ajv": "^6.12.6",
|
78
78
|
"cross-fetch": "*",
|
@@ -92,7 +92,7 @@
|
|
92
92
|
"vitest": "^3.1.3"
|
93
93
|
},
|
94
94
|
"peerDependencies": {
|
95
|
-
"@typescript-eslint/parser": "^8.38.1-alpha.
|
95
|
+
"@typescript-eslint/parser": "^8.38.1-alpha.2",
|
96
96
|
"eslint": "^8.57.0 || ^9.0.0",
|
97
97
|
"typescript": ">=4.8.4 <5.9.0"
|
98
98
|
},
|