@typescript-eslint/eslint-plugin 8.32.2-alpha.9 → 8.33.1-alpha.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.
@@ -147,7 +147,6 @@ declare const _default: {
147
147
  '@typescript-eslint/strict-boolean-expressions': "error";
148
148
  '@typescript-eslint/switch-exhaustiveness-check': "error";
149
149
  '@typescript-eslint/triple-slash-reference': "error";
150
- '@typescript-eslint/typedef': "error";
151
150
  '@typescript-eslint/unbound-method': "error";
152
151
  '@typescript-eslint/unified-signatures': "error";
153
152
  '@typescript-eslint/use-unknown-in-catch-callback-variable': "error";
@@ -1 +1 @@
1
- {"version":3,"file":"all.d.ts","sourceRoot":"","sources":["../../../src/configs/eslintrc/all.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,kBA0JiC"}
1
+ {"version":3,"file":"all.d.ts","sourceRoot":"","sources":["../../../src/configs/eslintrc/all.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,kBAyJiC"}
@@ -154,7 +154,6 @@ module.exports = {
154
154
  '@typescript-eslint/strict-boolean-expressions': 'error',
155
155
  '@typescript-eslint/switch-exhaustiveness-check': 'error',
156
156
  '@typescript-eslint/triple-slash-reference': 'error',
157
- '@typescript-eslint/typedef': 'error',
158
157
  '@typescript-eslint/unbound-method': 'error',
159
158
  '@typescript-eslint/unified-signatures': 'error',
160
159
  '@typescript-eslint/use-unknown-in-catch-callback-variable': 'error',
@@ -1 +1 @@
1
- {"version":3,"file":"all.d.ts","sourceRoot":"","sources":["../../../src/configs/flat/all.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAKrE;;;GAGG;yBAED,QAAQ,UAAU,CAAC,MAAM,EACzB,QAAQ,UAAU,CAAC,MAAM,KACxB,UAAU,CAAC,WAAW;AAHzB,wBAkKE"}
1
+ {"version":3,"file":"all.d.ts","sourceRoot":"","sources":["../../../src/configs/flat/all.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAKrE;;;GAGG;yBAED,QAAQ,UAAU,CAAC,MAAM,EACzB,QAAQ,UAAU,CAAC,MAAM,KACxB,UAAU,CAAC,WAAW;AAHzB,wBAiKE"}
@@ -167,7 +167,6 @@ exports.default = (plugin, parser) => [
167
167
  '@typescript-eslint/strict-boolean-expressions': 'error',
168
168
  '@typescript-eslint/switch-exhaustiveness-check': 'error',
169
169
  '@typescript-eslint/triple-slash-reference': 'error',
170
- '@typescript-eslint/typedef': 'error',
171
170
  '@typescript-eslint/unbound-method': 'error',
172
171
  '@typescript-eslint/unified-signatures': 'error',
173
172
  '@typescript-eslint/use-unknown-in-catch-callback-variable': 'error',
package/dist/index.d.ts CHANGED
@@ -149,7 +149,6 @@ declare const _default: {
149
149
  '@typescript-eslint/strict-boolean-expressions': "error";
150
150
  '@typescript-eslint/switch-exhaustiveness-check': "error";
151
151
  '@typescript-eslint/triple-slash-reference': "error";
152
- '@typescript-eslint/typedef': "error";
153
152
  '@typescript-eslint/unbound-method': "error";
154
153
  '@typescript-eslint/unified-signatures': "error";
155
154
  '@typescript-eslint/use-unknown-in-catch-callback-variable': "error";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,kBAA0B"}
@@ -171,7 +171,6 @@ declare const _default: {
171
171
  '@typescript-eslint/strict-boolean-expressions': "error";
172
172
  '@typescript-eslint/switch-exhaustiveness-check': "error";
173
173
  '@typescript-eslint/triple-slash-reference': "error";
174
- '@typescript-eslint/typedef': "error";
175
174
  '@typescript-eslint/unbound-method': "error";
176
175
  '@typescript-eslint/unified-signatures': "error";
177
176
  '@typescript-eslint/use-unknown-in-catch-callback-variable': "error";
@@ -1 +1 @@
1
- {"version":3,"file":"raw-plugin.d.ts","sourceRoot":"","sources":["../src/raw-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EA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3,"file":"typedef.d.ts","sourceRoot":"","sources":["../../src/rules/typedef.ts"],"names":[],"mappings":"AAMA,0BAAkB,UAAU;IAC1B,kBAAkB,uBAAuB;IACzC,cAAc,mBAAmB;IACjC,yBAAyB,8BAA8B;IACvD,mBAAmB,wBAAwB;IAC3C,SAAS,cAAc;IACvB,mBAAmB,wBAAwB;IAC3C,mBAAmB,wBAAwB;IAC3C,iCAAiC,sCAAsC;CACxE;AAED,MAAM,MAAM,OAAO,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;AAE7D,MAAM,MAAM,UAAU,GAAG,iBAAiB,GAAG,sBAAsB,CAAC;;AAEpE,wBAiSG"}
1
+ {"version":3,"file":"typedef.d.ts","sourceRoot":"","sources":["../../src/rules/typedef.ts"],"names":[],"mappings":"AAMA,0BAAkB,UAAU;IAC1B,kBAAkB,uBAAuB;IACzC,cAAc,mBAAmB;IACjC,yBAAyB,8BAA8B;IACvD,mBAAmB,wBAAwB;IAC3C,SAAS,cAAc;IACvB,mBAAmB,wBAAwB;IAC3C,mBAAmB,wBAAwB;IAC3C,iCAAiC,sCAAsC;CACxE;AAED,MAAM,MAAM,OAAO,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;AAE7D,MAAM,MAAM,UAAU,GAAG,iBAAiB,GAAG,sBAAsB,CAAC;;AAEpE,wBAqSG"}
@@ -18,6 +18,10 @@ exports.default = (0, util_1.createRule)({
18
18
  name: 'typedef',
19
19
  meta: {
20
20
  type: 'suggestion',
21
+ deprecated: {
22
+ deprecatedSince: '8.33.0',
23
+ message: 'This is an old rule that is no longer recommended for use.',
24
+ },
21
25
  docs: {
22
26
  description: 'Require type annotations in certain places',
23
27
  },
@@ -9,6 +9,18 @@ import TabItem from '@theme/TabItem';
9
9
  >
10
10
  > See **https://typescript-eslint.io/rules/typedef** for documentation.
11
11
 
12
+ :::caution
13
+
14
+ This is an old, deprecated rule.
15
+ It will be removed in a future major version of typescript-eslint.
16
+
17
+ Requiring type annotations unnecessarily can be cumbersome to maintain and generally reduces code readability.
18
+ TypeScript is often better at inferring types than easily written type annotations would allow.
19
+
20
+ **Instead of enabling `typedef`, it is generally recommended to use the `--noImplicitAny` and `--strictPropertyInitialization` compiler options to enforce type annotations only when useful.**
21
+
22
+ :::
23
+
12
24
  TypeScript cannot always infer types for all places in code.
13
25
  Some locations require type annotations for their types to be inferred.
14
26
 
@@ -30,15 +42,6 @@ class ContainsText {
30
42
 
31
43
  > To enforce type definitions existing on call signatures, use [`explicit-function-return-type`](./explicit-function-return-type.mdx), or [`explicit-module-boundary-types`](./explicit-module-boundary-types.mdx).
32
44
 
33
- :::caution
34
-
35
- Requiring type annotations unnecessarily can be cumbersome to maintain and generally reduces code readability.
36
- TypeScript is often better at inferring types than easily written type annotations would allow.
37
-
38
- **Instead of enabling `typedef`, it is generally recommended to use the `--noImplicitAny` and `--strictPropertyInitialization` compiler options to enforce type annotations only when useful.**
39
-
40
- :::
41
-
42
45
  ## Options
43
46
 
44
47
  For example, with the following configuration:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@typescript-eslint/eslint-plugin",
3
- "version": "8.32.2-alpha.9",
3
+ "version": "8.33.1-alpha.0",
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.2-alpha.9",
65
- "@typescript-eslint/type-utils": "8.32.2-alpha.9",
66
- "@typescript-eslint/utils": "8.32.2-alpha.9",
67
- "@typescript-eslint/visitor-keys": "8.32.2-alpha.9",
64
+ "@typescript-eslint/scope-manager": "8.33.1-alpha.0",
65
+ "@typescript-eslint/type-utils": "8.33.1-alpha.0",
66
+ "@typescript-eslint/utils": "8.33.1-alpha.0",
67
+ "@typescript-eslint/visitor-keys": "8.33.1-alpha.0",
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.2-alpha.9",
77
- "@typescript-eslint/rule-tester": "8.32.2-alpha.9",
76
+ "@typescript-eslint/rule-schema-to-typescript-types": "8.33.1-alpha.0",
77
+ "@typescript-eslint/rule-tester": "8.33.1-alpha.0",
78
78
  "@vitest/coverage-v8": "^3.1.3",
79
79
  "ajv": "^6.12.6",
80
80
  "cross-fetch": "*",
@@ -94,7 +94,7 @@
94
94
  "vitest": "^3.1.3"
95
95
  },
96
96
  "peerDependencies": {
97
- "@typescript-eslint/parser": "^8.32.2-alpha.9",
97
+ "@typescript-eslint/parser": "^8.33.1-alpha.0",
98
98
  "eslint": "^8.57.0 || ^9.0.0",
99
99
  "typescript": ">=4.8.4 <5.9.0"
100
100
  },