@depup/typescript-eslint__eslint-plugin 8.65.0-depup.0 → 8.67.0-depup.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/README.md CHANGED
@@ -13,8 +13,8 @@ npm install @depup/typescript-eslint__eslint-plugin
13
13
 
14
14
  | Field | Value |
15
15
  |-------|-------|
16
- | Original | [@typescript-eslint/eslint-plugin](https://www.npmjs.com/package/@typescript-eslint/eslint-plugin) @ 8.65.0 |
17
- | Processed | 2026-07-21 |
16
+ | Original | [@typescript-eslint/eslint-plugin](https://www.npmjs.com/package/@typescript-eslint/eslint-plugin) @ 8.67.0 |
17
+ | Processed | 2026-08-11 |
18
18
  | Smoke test | passed |
19
19
  | Deps updated | 1 |
20
20
 
package/changes.json CHANGED
@@ -5,6 +5,6 @@
5
5
  "to": "^7.0.6"
6
6
  }
7
7
  },
8
- "timestamp": "2026-07-21T16:08:47.156Z",
8
+ "timestamp": "2026-08-11T00:22:12.551Z",
9
9
  "totalUpdated": 1
10
10
  }
@@ -3,8 +3,8 @@
3
3
  * - disables rules from eslint:recommended which are already handled by TypeScript.
4
4
  * - enables rules that make sense due to TS's typechecking / transpilation.
5
5
  */
6
- declare const config: (style: "glob" | "minimatch") => {
6
+ declare const config: (style: 'glob' | 'minimatch') => {
7
7
  files: string[];
8
- rules: Record<string, "error" | "off" | "warn">;
8
+ rules: Record<string, 'error' | 'off' | 'warn'>;
9
9
  };
10
10
  export = config;
@@ -6,7 +6,7 @@
6
6
  declare const _default: {
7
7
  overrides: {
8
8
  files: string[];
9
- rules: Record<string, "error" | "off" | "warn">;
9
+ rules: Record<string, 'error' | 'off' | 'warn'>;
10
10
  }[];
11
11
  };
12
12
  export = _default;
@@ -1,7 +1,7 @@
1
1
  import type { FlatConfig } from '@typescript-eslint/utils/ts-eslint';
2
+ export default _default;
2
3
  /**
3
4
  * Enables each the rules provided as a part of typescript-eslint. Note that many rules are not applicable in all codebases, or are meant to be configured.
4
5
  * @see {@link https://typescript-eslint.io/users/configs#all}
5
6
  */
6
- declare const _default: (plugin: FlatConfig.Plugin, parser: FlatConfig.Parser) => FlatConfig.ConfigArray;
7
- export default _default;
7
+ declare function _default(plugin: FlatConfig.Plugin, parser: FlatConfig.Parser): FlatConfig.ConfigArray;
@@ -1,8 +1,8 @@
1
1
  import type { FlatConfig } from '@typescript-eslint/utils/ts-eslint';
2
+ export default _default;
2
3
  /**
3
4
  * A minimal ruleset that sets only the required parser and plugin options needed to run typescript-eslint.
4
5
  * We don't recommend using this directly; instead, extend from an earlier recommended rule.
5
6
  * @see {@link https://typescript-eslint.io/users/configs#base}
6
7
  */
7
- declare const _default: (plugin: FlatConfig.Plugin, parser: FlatConfig.Parser) => FlatConfig.Config;
8
- export default _default;
8
+ declare function _default(plugin: FlatConfig.Plugin, parser: FlatConfig.Parser): FlatConfig.Config;
@@ -1,7 +1,7 @@
1
1
  import type { FlatConfig } from '@typescript-eslint/utils/ts-eslint';
2
+ export default _default;
2
3
  /**
3
4
  * A utility ruleset that will disable type-aware linting and all type-aware rules available in our project.
4
5
  * @see {@link https://typescript-eslint.io/users/configs#disable-type-checked}
5
6
  */
6
- declare const _default: (_plugin: FlatConfig.Plugin, _parser: FlatConfig.Parser) => FlatConfig.Config;
7
- export default _default;
7
+ declare function _default(_plugin: FlatConfig.Plugin, _parser: FlatConfig.Parser): FlatConfig.Config;
@@ -1,9 +1,9 @@
1
1
  import type { FlatConfig } from '@typescript-eslint/utils/ts-eslint';
2
+ export default _default;
2
3
  /**
3
4
  * This is a compatibility ruleset that:
4
5
  * - disables rules from eslint:recommended which are already handled by TypeScript.
5
6
  * - enables rules that make sense due to TS's typechecking / transpilation.
6
7
  * @see {@link https://typescript-eslint.io/users/configs/#eslint-recommended}
7
8
  */
8
- declare const _default: (_plugin: FlatConfig.Plugin, _parser: FlatConfig.Parser) => FlatConfig.Config;
9
- export default _default;
9
+ declare function _default(_plugin: FlatConfig.Plugin, _parser: FlatConfig.Parser): FlatConfig.Config;
@@ -1,7 +1,7 @@
1
1
  import type { FlatConfig } from '@typescript-eslint/utils/ts-eslint';
2
+ export default _default;
2
3
  /**
3
4
  * A version of `recommended` that only contains type-checked rules and disables of any corresponding core ESLint rules.
4
5
  * @see {@link https://typescript-eslint.io/users/configs#recommended-type-checked-only}
5
6
  */
6
- declare const _default: (plugin: FlatConfig.Plugin, parser: FlatConfig.Parser) => FlatConfig.ConfigArray;
7
- export default _default;
7
+ declare function _default(plugin: FlatConfig.Plugin, parser: FlatConfig.Parser): FlatConfig.ConfigArray;
@@ -1,7 +1,7 @@
1
1
  import type { FlatConfig } from '@typescript-eslint/utils/ts-eslint';
2
+ export default _default;
2
3
  /**
3
4
  * Contains all of `recommended` along with additional recommended rules that require type information.
4
5
  * @see {@link https://typescript-eslint.io/users/configs#recommended-type-checked}
5
6
  */
6
- declare const _default: (plugin: FlatConfig.Plugin, parser: FlatConfig.Parser) => FlatConfig.ConfigArray;
7
- export default _default;
7
+ declare function _default(plugin: FlatConfig.Plugin, parser: FlatConfig.Parser): FlatConfig.ConfigArray;
@@ -1,7 +1,7 @@
1
1
  import type { FlatConfig } from '@typescript-eslint/utils/ts-eslint';
2
+ export default _default;
2
3
  /**
3
4
  * Recommended rules for code correctness that you can drop in without additional configuration.
4
5
  * @see {@link https://typescript-eslint.io/users/configs#recommended}
5
6
  */
6
- declare const _default: (plugin: FlatConfig.Plugin, parser: FlatConfig.Parser) => FlatConfig.ConfigArray;
7
- export default _default;
7
+ declare function _default(plugin: FlatConfig.Plugin, parser: FlatConfig.Parser): FlatConfig.ConfigArray;
@@ -1,7 +1,7 @@
1
1
  import type { FlatConfig } from '@typescript-eslint/utils/ts-eslint';
2
+ export default _default;
2
3
  /**
3
4
  * A version of `strict` that only contains type-checked rules and disables of any corresponding core ESLint rules.
4
5
  * @see {@link https://typescript-eslint.io/users/configs#strict-type-checked-only}
5
6
  */
6
- declare const _default: (plugin: FlatConfig.Plugin, parser: FlatConfig.Parser) => FlatConfig.ConfigArray;
7
- export default _default;
7
+ declare function _default(plugin: FlatConfig.Plugin, parser: FlatConfig.Parser): FlatConfig.ConfigArray;
@@ -1,7 +1,7 @@
1
1
  import type { FlatConfig } from '@typescript-eslint/utils/ts-eslint';
2
+ export default _default;
2
3
  /**
3
4
  * Contains all of `recommended`, `recommended-type-checked`, and `strict`, along with additional strict rules that require type information.
4
5
  * @see {@link https://typescript-eslint.io/users/configs#strict-type-checked}
5
6
  */
6
- declare const _default: (plugin: FlatConfig.Plugin, parser: FlatConfig.Parser) => FlatConfig.ConfigArray;
7
- export default _default;
7
+ declare function _default(plugin: FlatConfig.Plugin, parser: FlatConfig.Parser): FlatConfig.ConfigArray;
@@ -1,7 +1,7 @@
1
1
  import type { FlatConfig } from '@typescript-eslint/utils/ts-eslint';
2
+ export default _default;
2
3
  /**
3
4
  * Contains all of `recommended`, as well as additional strict rules that can also catch bugs.
4
5
  * @see {@link https://typescript-eslint.io/users/configs#strict}
5
6
  */
6
- declare const _default: (plugin: FlatConfig.Plugin, parser: FlatConfig.Parser) => FlatConfig.ConfigArray;
7
- export default _default;
7
+ declare function _default(plugin: FlatConfig.Plugin, parser: FlatConfig.Parser): FlatConfig.ConfigArray;
@@ -1,7 +1,7 @@
1
1
  import type { FlatConfig } from '@typescript-eslint/utils/ts-eslint';
2
+ export default _default;
2
3
  /**
3
4
  * A version of `stylistic` that only contains type-checked rules and disables of any corresponding core ESLint rules.
4
5
  * @see {@link https://typescript-eslint.io/users/configs#stylistic-type-checked-only}
5
6
  */
6
- declare const _default: (plugin: FlatConfig.Plugin, parser: FlatConfig.Parser) => FlatConfig.ConfigArray;
7
- export default _default;
7
+ declare function _default(plugin: FlatConfig.Plugin, parser: FlatConfig.Parser): FlatConfig.ConfigArray;
@@ -1,7 +1,7 @@
1
1
  import type { FlatConfig } from '@typescript-eslint/utils/ts-eslint';
2
+ export default _default;
2
3
  /**
3
4
  * Contains all of `stylistic`, along with additional stylistic rules that require type information.
4
5
  * @see {@link https://typescript-eslint.io/users/configs#stylistic-type-checked}
5
6
  */
6
- declare const _default: (plugin: FlatConfig.Plugin, parser: FlatConfig.Parser) => FlatConfig.ConfigArray;
7
- export default _default;
7
+ declare function _default(plugin: FlatConfig.Plugin, parser: FlatConfig.Parser): FlatConfig.ConfigArray;
@@ -1,7 +1,7 @@
1
1
  import type { FlatConfig } from '@typescript-eslint/utils/ts-eslint';
2
+ export default _default;
2
3
  /**
3
4
  * Rules considered to be best practice for modern TypeScript codebases, but that do not impact program logic.
4
5
  * @see {@link https://typescript-eslint.io/users/configs#stylistic}
5
6
  */
6
- declare const _default: (plugin: FlatConfig.Plugin, parser: FlatConfig.Parser) => FlatConfig.ConfigArray;
7
- export default _default;
7
+ declare function _default(plugin: FlatConfig.Plugin, parser: FlatConfig.Parser): FlatConfig.ConfigArray;
package/dist/index.d.ts CHANGED
@@ -234,7 +234,7 @@ declare const _default: {
234
234
  'eslint-recommended': {
235
235
  overrides: {
236
236
  files: string[];
237
- rules: Record<string, "error" | "off" | "warn">;
237
+ rules: Record<string, 'error' | 'off' | 'warn'>;
238
238
  }[];
239
239
  };
240
240
  recommended: {
@@ -256,7 +256,7 @@ declare const _default: {
256
256
  'eslint-recommended': {
257
257
  overrides: {
258
258
  files: string[];
259
- rules: Record<string, "error" | "off" | "warn">;
259
+ rules: Record<string, 'error' | 'off' | 'warn'>;
260
260
  }[];
261
261
  };
262
262
  recommended: {
@@ -113,22 +113,29 @@ exports.default = (0, util_1.createRule)({
113
113
  if (hasDuplicateKeySetter) {
114
114
  return;
115
115
  }
116
+ const getterBody = node.value.body;
116
117
  context.report({
117
118
  node: node.key,
118
119
  messageId: 'preferFieldStyle',
119
- suggest: [
120
- {
120
+ ...(0, util_1.getFixOrSuggest)({
121
+ fixOrSuggest: node.decorators.length === 0 ? 'suggest' : 'none',
122
+ suggestion: {
121
123
  messageId: 'preferFieldStyleSuggestion',
122
124
  fix(fixer) {
123
125
  const name = context.sourceCode.getText(node.key);
126
+ const closingParen = (0, util_1.nullThrows)(context.sourceCode.getTokenBefore(node.value.returnType ?? getterBody), 'Getter should have a closing parenthesis.');
127
+ const betweenParensAndBody = context.sourceCode
128
+ .getText()
129
+ .slice(closingParen.range[1], getterBody.range[0]);
124
130
  let text = '';
125
131
  text += printNodeModifiers(node, 'readonly');
126
132
  text += node.computed ? `[${name}]` : name;
127
- text += ` = ${context.sourceCode.getText(argument)};`;
133
+ text += betweenParensAndBody;
134
+ text += `= ${context.sourceCode.getText(argument)};`;
128
135
  return fixer.replaceText(node, text);
129
136
  },
130
137
  },
131
- ],
138
+ }),
132
139
  });
133
140
  },
134
141
  }),
@@ -1,4 +1,5 @@
1
1
  import type { TSESLint } from '@typescript-eslint/utils';
2
+ import type { RuleListener } from '@typescript-eslint/utils/eslint-utils';
2
3
  type Prefer = 'no-type-imports' | 'type-imports';
3
4
  type FixStyle = 'inline-type-imports' | 'separate-type-imports';
4
5
  export type Options = [
@@ -9,7 +10,7 @@ export type Options = [
9
10
  }
10
11
  ];
11
12
  export type MessageIds = 'avoidImportType' | 'noImportTypeAnnotations' | 'someImportsAreOnlyTypes' | 'typeOverValue';
12
- declare const _default: TSESLint.RuleModule<MessageIds, Options, import("../../rules").ESLintPluginDocs, TSESLint.RuleListener> & {
13
+ declare const _default: TSESLint.RuleModule<MessageIds, Options, import("../../rules").ESLintPluginDocs, RuleListener> & {
13
14
  name: string;
14
15
  };
15
16
  export default _default;
@@ -233,7 +233,7 @@ exports.default = (0, util_1.createRule)({
233
233
  }
234
234
  const typeFlag = builtInTypeFlags[nodeCallee.name];
235
235
  const scope = context.sourceCode.getScope(node);
236
- const variable = scope.set.get(nodeCallee.name);
236
+ const variable = utils_1.ASTUtils.findVariable(scope, nodeCallee.name);
237
237
  if (!!variable?.defs.length ||
238
238
  !doesUnderlyingTypeMatchFlag((0, util_1.getConstrainedTypeAtLocation)(services, node.arguments[0]), typeFlag)) {
239
239
  return;
@@ -356,6 +356,11 @@ function collectTypeParameterUsageCounts(checker, node, foundIdentifierUsages, f
356
356
  // They have properties, so we need to avoid double-counting.
357
357
  visitType(type.templateType ?? type.constraintType, false);
358
358
  }
359
+ // TS doesn't count mapped types key remapping (`{[K in 'a' as T]: K}`)
360
+ // but handles this under `MappedType.nameType`, so we need to visit that too.
361
+ if (type.nameType) {
362
+ visitType(type.nameType, false);
363
+ }
359
364
  }
360
365
  visitType(type.getNumberIndexType(), true);
361
366
  visitType(type.getStringIndexType(), true);
@@ -138,21 +138,24 @@ exports.default = (0, util_1.createRule)({
138
138
  signatures[0].getDeclaration() === tsFunc) {
139
139
  return;
140
140
  }
141
- const params = signatures[0].getParameters();
142
- if (paramIndex < params.length) {
141
+ const defaultCanBeUsed = signatures.some(signature => {
142
+ const params = signature.getParameters();
143
+ if (paramIndex >= params.length) {
144
+ return true;
145
+ }
143
146
  const paramSymbol = params[paramIndex];
144
147
  if (paramSymbol.valueDeclaration &&
145
- ts.isParameter(paramSymbol.valueDeclaration) &&
146
- paramSymbol.valueDeclaration.dotDotDotToken != null) {
147
- return;
148
+ (0, util_1.isRestParameterDeclaration)(paramSymbol.valueDeclaration)) {
149
+ return true;
148
150
  }
149
- if (!tsutils.isSymbolFlagSet(paramSymbol, ts.SymbolFlags.Optional)) {
150
- const paramType = checker.getTypeOfSymbol(paramSymbol);
151
- if (!tsutils.isTypeParameter(paramType) &&
152
- !canBeUndefined(paramType)) {
153
- reportUselessDefaultAssignment(node, 'parameter');
154
- }
151
+ if (tsutils.isSymbolFlagSet(paramSymbol, ts.SymbolFlags.Optional)) {
152
+ return true;
155
153
  }
154
+ const paramType = checker.getTypeOfSymbol(paramSymbol);
155
+ return (tsutils.isTypeParameter(paramType) || canBeUndefined(paramType));
156
+ });
157
+ if (!defaultCanBeUsed) {
158
+ reportUselessDefaultAssignment(node, 'parameter');
156
159
  }
157
160
  }
158
161
  }
@@ -1,7 +1,7 @@
1
1
  import type { TSESLint } from '@typescript-eslint/utils';
2
2
  export declare const phrases: {
3
- readonly TSInterfaceDeclaration: "Interface";
4
- readonly TSTypeLiteral: "Type literal";
3
+ readonly TSInterfaceDeclaration: 'Interface';
4
+ readonly TSTypeLiteral: 'Type literal';
5
5
  };
6
6
  declare const _default: TSESLint.RuleModule<"functionTypeOverCallableType" | "unexpectedThisOnFunctionOnlyInterface", [], import("../../rules").ESLintPluginDocs, TSESLint.RuleListener> & {
7
7
  name: string;
@@ -468,7 +468,7 @@ function isBuiltInBooleanCall(node, context) {
468
468
  node.callee.name === 'Boolean' &&
469
469
  node.arguments[0]) {
470
470
  const scope = context.sourceCode.getScope(node);
471
- const variable = scope.set.get(utils_1.AST_TOKEN_TYPES.Boolean);
471
+ const variable = utils_1.ASTUtils.findVariable(scope, node.callee);
472
472
  return variable == null || variable.defs.length === 0;
473
473
  }
474
474
  return false;
@@ -34,7 +34,7 @@ export * from './truthinessUtils';
34
34
  export * from './walkStatements';
35
35
  export * from '@typescript-eslint/type-utils';
36
36
  export declare const applyDefault: typeof ESLintUtils.applyDefault, deepMerge: typeof ESLintUtils.deepMerge, getParserServices: typeof ESLintUtils.getParserServices, isObjectNotArray: typeof ESLintUtils.isObjectNotArray, nullThrows: typeof ESLintUtils.nullThrows, NullThrowsReasons: {
37
- readonly MissingParent: "Expected node to have a parent.";
37
+ readonly MissingParent: 'Expected node to have a parent.';
38
38
  readonly MissingToken: (token: string, thing: string) => string;
39
39
  };
40
40
  export type InferMessageIdsTypeFromRule<T> = ESLintUtils.InferMessageIdsTypeFromRule<T>;
@@ -51,4 +51,4 @@ __exportStar(require("./truthinessUtils"), exports);
51
51
  __exportStar(require("./walkStatements"), exports);
52
52
  // this is done for convenience - saves migrating all of the old rules
53
53
  __exportStar(require("@typescript-eslint/type-utils"), exports);
54
- exports.applyDefault = utils_1.ESLintUtils.applyDefault, exports.deepMerge = utils_1.ESLintUtils.deepMerge, exports.getParserServices = utils_1.ESLintUtils.getParserServices, exports.isObjectNotArray = utils_1.ESLintUtils.isObjectNotArray, exports.nullThrows = utils_1.ESLintUtils.nullThrows, exports.NullThrowsReasons = utils_1.ESLintUtils.NullThrowsReasons;
54
+ ({ applyDefault: exports.applyDefault, deepMerge: exports.deepMerge, getParserServices: exports.getParserServices, isObjectNotArray: exports.isObjectNotArray, nullThrows: exports.nullThrows, NullThrowsReasons: exports.NullThrowsReasons } = utils_1.ESLintUtils);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@depup/typescript-eslint__eslint-plugin",
3
- "version": "8.65.0-depup.0",
3
+ "version": "8.67.0-depup.0",
4
4
  "description": "TypeScript plugin for ESLint (with updated dependencies)",
5
5
  "files": [
6
6
  "dist",
@@ -57,17 +57,17 @@
57
57
  "ignore": "^7.0.6",
58
58
  "natural-compare": "^1.4.0",
59
59
  "ts-api-utils": "^2.5.0",
60
- "@typescript-eslint/scope-manager": "8.65.0",
61
- "@typescript-eslint/visitor-keys": "8.65.0",
62
- "@typescript-eslint/type-utils": "8.65.0",
63
- "@typescript-eslint/utils": "8.65.0"
60
+ "@typescript-eslint/scope-manager": "8.67.0",
61
+ "@typescript-eslint/type-utils": "8.67.0",
62
+ "@typescript-eslint/visitor-keys": "8.67.0",
63
+ "@typescript-eslint/utils": "8.67.0"
64
64
  },
65
65
  "devDependencies": {
66
66
  "@types/json-schema": "^7.0.15",
67
67
  "@types/mdast": "^4.0.4",
68
68
  "@types/natural-compare": "^1.4.3",
69
69
  "@types/react": "^18.3.21",
70
- "@typescript/native-preview": "7.0.0-dev.20260518.1",
70
+ "@typescript/native": "npm:typescript@^7.0.2",
71
71
  "@vitest/coverage-v8": "^4.0.18",
72
72
  "ajv": "^6.12.6",
73
73
  "eslint": "^10.0.0",
@@ -84,13 +84,13 @@
84
84
  "typescript": ">=4.8.4 <6.1.0",
85
85
  "unist-util-visit": "^5.0.0",
86
86
  "vitest": "^4.0.18",
87
- "@typescript-eslint/rule-schema-to-typescript-types": "8.65.0",
88
- "@typescript-eslint/rule-tester": "8.65.0"
87
+ "@typescript-eslint/rule-schema-to-typescript-types": "8.67.0",
88
+ "@typescript-eslint/rule-tester": "8.67.0"
89
89
  },
90
90
  "peerDependencies": {
91
91
  "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0",
92
92
  "typescript": ">=4.8.4 <6.1.0",
93
- "@typescript-eslint/parser": "^8.65.0"
93
+ "@typescript-eslint/parser": "^8.67.0"
94
94
  },
95
95
  "funding": {
96
96
  "type": "opencollective",
@@ -148,8 +148,8 @@
148
148
  },
149
149
  "depsUpdated": 1,
150
150
  "originalPackage": "@typescript-eslint/eslint-plugin",
151
- "originalVersion": "8.65.0",
152
- "processedAt": "2026-07-21T16:08:55.880Z",
151
+ "originalVersion": "8.67.0",
152
+ "processedAt": "2026-08-11T00:22:24.814Z",
153
153
  "smokeTest": "passed"
154
154
  }
155
155
  }