@taiga-ui/eslint-plugin-experience-next 0.458.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.
Files changed (2) hide show
  1. package/index.esm.js +8 -2
  2. package/package.json +1 -1
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': 'error',
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()) {
@@ -2219,6 +2218,13 @@ const rule$5 = createRule$7({
2219
2218
  !value.returnType) {
2220
2219
  return;
2221
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
+ }
2222
2228
  // If the initializer is a call to a generic function with no explicit
2223
2229
  // type arguments, the type parameters may be inferred from the
2224
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.458.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",