@typescript-eslint/eslint-plugin 8.71.3-alpha.8 → 8.72.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.
- package/dist/index.d.ts +1 -453
- package/dist/raw-plugin.d.ts +1 -453
- package/dist/rules/await-thenable.d.ts +6 -1
- package/dist/rules/await-thenable.js +25 -3
- package/dist/rules/index.d.ts +1 -453
- package/dist/rules/index.js +140 -277
- package/dist/rules/no-deprecated.js +1 -1
- package/dist/rules/no-redundant-type-constituents.js +1 -1
- package/dist/rules/no-unnecessary-condition.js +2 -2
- package/dist/rules/no-unnecessary-type-assertion.js +1 -1
- package/dist/rules/require-array-sort-compare.js +44 -2
- package/dist/util/lazyRules.d.ts +6 -0
- package/dist/util/lazyRules.js +18 -0
- package/dist/util/truthinessUtils.js +2 -1
- package/package.json +10 -10
|
@@ -34,12 +34,13 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.isPossiblyTruthy = exports.isPossiblyFalsy = void 0;
|
|
37
|
+
const type_utils_1 = require("@typescript-eslint/type-utils");
|
|
37
38
|
const tsutils = __importStar(require("ts-api-utils"));
|
|
38
39
|
const ts = __importStar(require("typescript"));
|
|
39
40
|
const getValueOfLiteralType_1 = require("./getValueOfLiteralType");
|
|
40
41
|
// Truthiness utilities
|
|
41
42
|
const isTruthyLiteral = (type) => tsutils.isTrueLiteralType(type) ||
|
|
42
|
-
(
|
|
43
|
+
((0, type_utils_1.isTypeLiteralType)(type) && !!(0, getValueOfLiteralType_1.getValueOfLiteralType)(type));
|
|
43
44
|
const isPossiblyFalsy = (type) => tsutils
|
|
44
45
|
.unionConstituents(type)
|
|
45
46
|
// Intersections like `string & {}` can also be possibly falsy,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@typescript-eslint/eslint-plugin",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.72.0",
|
|
4
4
|
"description": "TypeScript plugin for ESLint",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -47,10 +47,10 @@
|
|
|
47
47
|
],
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"@eslint-community/regexpp": "^4.12.2",
|
|
50
|
-
"@typescript-eslint/scope-manager": "8.
|
|
51
|
-
"@typescript-eslint/type-utils": "8.
|
|
52
|
-
"@typescript-eslint/utils": "8.
|
|
53
|
-
"@typescript-eslint/visitor-keys": "8.
|
|
50
|
+
"@typescript-eslint/scope-manager": "8.72.0",
|
|
51
|
+
"@typescript-eslint/type-utils": "8.72.0",
|
|
52
|
+
"@typescript-eslint/utils": "8.72.0",
|
|
53
|
+
"@typescript-eslint/visitor-keys": "8.72.0",
|
|
54
54
|
"ignore": "^7.0.5",
|
|
55
55
|
"natural-compare": "^1.4.0",
|
|
56
56
|
"ts-api-utils": "^2.5.0"
|
|
@@ -60,10 +60,10 @@
|
|
|
60
60
|
"@types/mdast": "^4.0.4",
|
|
61
61
|
"@types/natural-compare": "^1.4.3",
|
|
62
62
|
"@types/react": "^18.3.21",
|
|
63
|
-
"@typescript-eslint/rule-schema-to-typescript-types": "8.
|
|
64
|
-
"@typescript-eslint/rule-tester": "8.
|
|
63
|
+
"@typescript-eslint/rule-schema-to-typescript-types": "8.72.0",
|
|
64
|
+
"@typescript-eslint/rule-tester": "8.72.0",
|
|
65
65
|
"@typescript/native": "npm:typescript@^7.0.2",
|
|
66
|
-
"@vitest/coverage-v8": "^
|
|
66
|
+
"@vitest/coverage-v8": "^5.0.3",
|
|
67
67
|
"ajv": "^6.12.6",
|
|
68
68
|
"eslint": "^10.0.0",
|
|
69
69
|
"json-schema": "^0.4.0",
|
|
@@ -78,10 +78,10 @@
|
|
|
78
78
|
"tsx": "^4.7.2",
|
|
79
79
|
"typescript": ">=4.8.4 <6.1.0",
|
|
80
80
|
"unist-util-visit": "^5.0.0",
|
|
81
|
-
"vitest": "^
|
|
81
|
+
"vitest": "^5.0.3"
|
|
82
82
|
},
|
|
83
83
|
"peerDependencies": {
|
|
84
|
-
"@typescript-eslint/parser": "^8.
|
|
84
|
+
"@typescript-eslint/parser": "^8.72.0",
|
|
85
85
|
"eslint": "^8.57.0 || ^9.0.0 || ^10.0.0",
|
|
86
86
|
"typescript": ">=4.8.4 <6.1.0"
|
|
87
87
|
},
|