@typescript-eslint/eslint-plugin 8.46.4-alpha.0 → 8.46.4-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.
@@ -1,4 +1,3 @@
1
- import type { TSESTree } from '@typescript-eslint/utils';
2
1
  import type { SelectorsString } from './enums';
3
- import type { Context, NormalizedSelector } from './types';
4
- export declare function createValidator(type: SelectorsString, context: Context, allConfigs: NormalizedSelector[]): (node: TSESTree.Identifier | TSESTree.Literal | TSESTree.PrivateIdentifier) => void;
2
+ import type { Context, NormalizedSelector, ValidatorFunction } from './types';
3
+ export declare function createValidator(type: SelectorsString, context: Context, allConfigs: NormalizedSelector[]): ValidatorFunction;
@@ -361,6 +361,12 @@ exports.default = (0, util_1.createRule)({
361
361
  parent.type === utils_1.AST_NODE_TYPES.ExportAllDeclaration) {
362
362
  return;
363
363
  }
364
+ // Computed identifier expressions are handled by checkMemberExpression
365
+ if (parent.type === utils_1.AST_NODE_TYPES.MemberExpression &&
366
+ parent.computed &&
367
+ parent.property === node) {
368
+ return;
369
+ }
364
370
  if (parent.type === utils_1.AST_NODE_TYPES.ExportSpecifier) {
365
371
  // only deal with the alias (exported) side, not the local binding
366
372
  if (parent.exported !== node) {
@@ -156,10 +156,12 @@ exports.default = (0, util_1.createRule)({
156
156
  const lastDecorator = method.decorators[method.decorators.length - 1];
157
157
  keyToken = (0, util_1.nullThrows)(context.sourceCode.getTokenAfter(lastDecorator), util_1.NullThrowsReasons.MissingToken('key token', 'last decorator'));
158
158
  }
159
- // if current token is a keyword like `static` or `public` then skip it
160
- while (keyToken.type === utils_1.AST_TOKEN_TYPES.Keyword &&
159
+ // if current token is a keyword like `static` or `public`, or the `override` modifier, then skip it
160
+ while ((keyToken.type === utils_1.AST_TOKEN_TYPES.Keyword ||
161
+ (keyToken.type === utils_1.AST_TOKEN_TYPES.Identifier &&
162
+ keyToken.value === 'override')) &&
161
163
  keyToken.range[0] < method.key.range[0]) {
162
- keyToken = (0, util_1.nullThrows)(context.sourceCode.getTokenAfter(keyToken), util_1.NullThrowsReasons.MissingToken('token', 'keyword'));
164
+ keyToken = (0, util_1.nullThrows)(context.sourceCode.getTokenAfter(keyToken), util_1.NullThrowsReasons.MissingToken('token', 'modifier keyword'));
163
165
  }
164
166
  // check if there is a space between key and previous token
165
167
  const insertSpace = !context.sourceCode.isSpaceBetween((0, util_1.nullThrows)(context.sourceCode.getTokenBefore(keyToken), util_1.NullThrowsReasons.MissingToken('token', 'keyword')), keyToken);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@typescript-eslint/eslint-plugin",
3
- "version": "8.46.4-alpha.0",
3
+ "version": "8.46.4-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.46.4-alpha.0",
63
- "@typescript-eslint/type-utils": "8.46.4-alpha.0",
64
- "@typescript-eslint/utils": "8.46.4-alpha.0",
65
- "@typescript-eslint/visitor-keys": "8.46.4-alpha.0",
62
+ "@typescript-eslint/scope-manager": "8.46.4-alpha.2",
63
+ "@typescript-eslint/type-utils": "8.46.4-alpha.2",
64
+ "@typescript-eslint/utils": "8.46.4-alpha.2",
65
+ "@typescript-eslint/visitor-keys": "8.46.4-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.46.4-alpha.0",
75
- "@typescript-eslint/rule-tester": "8.46.4-alpha.0",
74
+ "@typescript-eslint/rule-schema-to-typescript-types": "8.46.4-alpha.2",
75
+ "@typescript-eslint/rule-tester": "8.46.4-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.46.4-alpha.0",
95
+ "@typescript-eslint/parser": "^8.46.4-alpha.2",
96
96
  "eslint": "^8.57.0 || ^9.0.0",
97
97
  "typescript": ">=4.8.4 <6.0.0"
98
98
  },