@taiga-ui/eslint-plugin-experience-next 0.457.0 → 0.459.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/index.esm.js +18 -2
- package/package.json +3 -3
package/index.esm.js
CHANGED
|
@@ -630,7 +630,7 @@ var recommended = defineConfig([
|
|
|
630
630
|
'max-depth': 'error',
|
|
631
631
|
'max-nested-callbacks': ['error', 4],
|
|
632
632
|
'max-params': ['error', 5],
|
|
633
|
-
'no-bitwise': '
|
|
633
|
+
'no-bitwise': 'off',
|
|
634
634
|
'no-case-declarations': 'error',
|
|
635
635
|
'no-console': ['error', { allow: ['info', 'assert', 'warn', 'error'] }],
|
|
636
636
|
'no-constant-condition': 'error',
|
|
@@ -1292,7 +1292,6 @@ const config$2 = {
|
|
|
1292
1292
|
},
|
|
1293
1293
|
};
|
|
1294
1294
|
|
|
1295
|
-
/* eslint-disable no-bitwise */
|
|
1296
1295
|
function getFieldTypes(type, checker) {
|
|
1297
1296
|
const typeNames = [];
|
|
1298
1297
|
if (type.isUnionOrIntersection()) {
|
|
@@ -2209,6 +2208,23 @@ const rule$5 = createRule$7({
|
|
|
2209
2208
|
typeChecker.typeToString(inferredType)) {
|
|
2210
2209
|
return;
|
|
2211
2210
|
}
|
|
2211
|
+
// If the initializer is a function expression or arrow function without
|
|
2212
|
+
// its own return type annotation, the variable annotation may be the
|
|
2213
|
+
// only explicit return type declaration (satisfying
|
|
2214
|
+
// @typescript-eslint/explicit-function-return-type via
|
|
2215
|
+
// allowTypedFunctionExpressions). Removing it would break that rule.
|
|
2216
|
+
if ((value.type === AST_NODE_TYPES.ArrowFunctionExpression ||
|
|
2217
|
+
value.type === AST_NODE_TYPES.FunctionExpression) &&
|
|
2218
|
+
!value.returnType) {
|
|
2219
|
+
return;
|
|
2220
|
+
}
|
|
2221
|
+
// If the declared type is a tuple and the initializer is an array literal,
|
|
2222
|
+
// the annotation provides contextual typing that narrows the inferred type
|
|
2223
|
+
// from T[] to [T1, T2, ...]. Removing it would widen the type back to T[].
|
|
2224
|
+
if (value.type === AST_NODE_TYPES.ArrayExpression &&
|
|
2225
|
+
typeChecker.isTupleType(declaredType)) {
|
|
2226
|
+
return;
|
|
2227
|
+
}
|
|
2212
2228
|
// If the initializer is a call to a generic function with no explicit
|
|
2213
2229
|
// type arguments, the type parameters may be inferred from the
|
|
2214
2230
|
// contextual return type provided by this annotation. Removing the
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@taiga-ui/eslint-plugin-experience-next",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.459.0",
|
|
4
4
|
"description": "An ESLint plugin to enforce a consistent code styles across taiga-ui projects",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"eslint": "^9.39.2",
|
|
44
44
|
"eslint-config-prettier": "^10.1.7",
|
|
45
45
|
"eslint-plugin-compat": "^7.0.1",
|
|
46
|
-
"eslint-plugin-cypress": "^6.2.
|
|
46
|
+
"eslint-plugin-cypress": "^6.2.3",
|
|
47
47
|
"eslint-plugin-de-morgan": "^2.1.1",
|
|
48
48
|
"eslint-plugin-decorator-position": "^6.0.0",
|
|
49
49
|
"eslint-plugin-file-progress": "^3.0.2",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"eslint-plugin-prettier": "^5.5.5",
|
|
56
56
|
"eslint-plugin-promise": "^7.2.1",
|
|
57
57
|
"eslint-plugin-regexp": "^3.1.0",
|
|
58
|
-
"eslint-plugin-simple-import-sort": "^
|
|
58
|
+
"eslint-plugin-simple-import-sort": "^13.0.0",
|
|
59
59
|
"eslint-plugin-sonarjs": "^4.0.2",
|
|
60
60
|
"eslint-plugin-unicorn": "^64.0.0",
|
|
61
61
|
"eslint-plugin-unused-imports": "^4.4.1",
|