@typescript-eslint/eslint-plugin 8.32.1-alpha.7 → 8.32.1

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.
@@ -1 +1 @@
1
- {"version":3,"file":"consistent-indexed-object-style.d.ts","sourceRoot":"","sources":["../../src/rules/consistent-indexed-object-style.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAY,MAAM,0BAA0B,CAAC;AAanE,MAAM,MAAM,UAAU,GAClB,sBAAsB,GACtB,gCAAgC,GAChC,cAAc,CAAC;AACnB,MAAM,MAAM,OAAO,GAAG,CAAC,iBAAiB,GAAG,QAAQ,CAAC,CAAC;;AAErD,wBA4OG"}
1
+ {"version":3,"file":"consistent-indexed-object-style.d.ts","sourceRoot":"","sources":["../../src/rules/consistent-indexed-object-style.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAY,MAAM,0BAA0B,CAAC;AAanE,MAAM,MAAM,UAAU,GAClB,sBAAsB,GACtB,gCAAgC,GAChC,cAAc,CAAC;AACnB,MAAM,MAAM,OAAO,GAAG,CAAC,iBAAiB,GAAG,QAAQ,CAAC,CAAC;;AAErD,wBA2OG"}
@@ -139,9 +139,7 @@ exports.default = (0, util_1.createRule)({
139
139
  const scope = context.sourceCode.getScope(key);
140
140
  const superVar = utils_1.ASTUtils.findVariable(scope, parentId.name);
141
141
  if (superVar) {
142
- const isCircular = superVar.references.some(item => item.isTypeReference &&
143
- node.range[0] <= item.identifier.range[0] &&
144
- node.range[1] >= item.identifier.range[1]);
142
+ const isCircular = isDeeplyReferencingType(node.parent, superVar, new Set([parentId]));
145
143
  if (isCircular) {
146
144
  return;
147
145
  }
@@ -203,6 +201,11 @@ function isDeeplyReferencingType(node, superVar, visited) {
203
201
  return isDeeplyReferencingType(node.typeAnnotation, superVar, visited);
204
202
  case utils_1.AST_NODE_TYPES.TSIndexedAccessType:
205
203
  return [node.indexType, node.objectType].some(type => isDeeplyReferencingType(type, superVar, visited));
204
+ case utils_1.AST_NODE_TYPES.TSMappedType:
205
+ if (node.typeAnnotation) {
206
+ return isDeeplyReferencingType(node.typeAnnotation, superVar, visited);
207
+ }
208
+ break;
206
209
  case utils_1.AST_NODE_TYPES.TSConditionalType:
207
210
  return [
208
211
  node.checkType,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@typescript-eslint/eslint-plugin",
3
- "version": "8.32.1-alpha.7",
3
+ "version": "8.32.1",
4
4
  "description": "TypeScript plugin for ESLint",
5
5
  "files": [
6
6
  "dist",
@@ -61,10 +61,10 @@
61
61
  },
62
62
  "dependencies": {
63
63
  "@eslint-community/regexpp": "^4.10.0",
64
- "@typescript-eslint/scope-manager": "8.32.1-alpha.7",
65
- "@typescript-eslint/type-utils": "8.32.1-alpha.7",
66
- "@typescript-eslint/utils": "8.32.1-alpha.7",
67
- "@typescript-eslint/visitor-keys": "8.32.1-alpha.7",
64
+ "@typescript-eslint/scope-manager": "8.32.1",
65
+ "@typescript-eslint/type-utils": "8.32.1",
66
+ "@typescript-eslint/utils": "8.32.1",
67
+ "@typescript-eslint/visitor-keys": "8.32.1",
68
68
  "graphemer": "^1.4.0",
69
69
  "ignore": "^7.0.0",
70
70
  "natural-compare": "^1.4.0",
@@ -73,8 +73,8 @@
73
73
  "devDependencies": {
74
74
  "@types/mdast": "^4.0.3",
75
75
  "@types/natural-compare": "*",
76
- "@typescript-eslint/rule-schema-to-typescript-types": "8.32.1-alpha.7",
77
- "@typescript-eslint/rule-tester": "8.32.1-alpha.7",
76
+ "@typescript-eslint/rule-schema-to-typescript-types": "8.32.1",
77
+ "@typescript-eslint/rule-tester": "8.32.1",
78
78
  "@vitest/coverage-v8": "^3.1.3",
79
79
  "ajv": "^6.12.6",
80
80
  "cross-fetch": "*",