@typescript-eslint/eslint-plugin 6.7.6-alpha.3 → 6.7.6-alpha.5
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.
|
@@ -98,7 +98,7 @@ function greet(param: Array<string>): Array<string> {}
|
|
|
98
98
|
|
|
99
99
|
A boolean to specify if arrays from the rest operator are considered okay. `false` by default.
|
|
100
100
|
|
|
101
|
-
|
|
101
|
+
The examples below are **incorrect** when `{ignoreRestArgs: false}`, but **correct** when `{ignoreRestArgs: true}`.
|
|
102
102
|
|
|
103
103
|
```ts
|
|
104
104
|
/*eslint @typescript-eslint/no-explicit-any: ["error", { "ignoreRestArgs": false }]*/
|
|
@@ -127,35 +127,6 @@ interface Garply {
|
|
|
127
127
|
}
|
|
128
128
|
```
|
|
129
129
|
|
|
130
|
-
Examples of **correct** code for the `{ "ignoreRestArgs": true }` option:
|
|
131
|
-
|
|
132
|
-
```ts
|
|
133
|
-
/*eslint @typescript-eslint/no-explicit-any: ["error", { "ignoreRestArgs": true }]*/
|
|
134
|
-
|
|
135
|
-
function foo1(...args: any[]): void {}
|
|
136
|
-
function foo2(...args: readonly any[]): void {}
|
|
137
|
-
function foo3(...args: Array<any>): void {}
|
|
138
|
-
function foo4(...args: ReadonlyArray<any>): void {}
|
|
139
|
-
|
|
140
|
-
declare function bar(...args: any[]): void;
|
|
141
|
-
|
|
142
|
-
const baz = (...args: any[]) => {};
|
|
143
|
-
const qux = function (...args: any[]) {};
|
|
144
|
-
|
|
145
|
-
type Quux = (...args: any[]) => void;
|
|
146
|
-
type Quuz = new (...args: any[]) => void;
|
|
147
|
-
|
|
148
|
-
interface Grault {
|
|
149
|
-
(...args: any[]): void;
|
|
150
|
-
}
|
|
151
|
-
interface Corge {
|
|
152
|
-
new (...args: any[]): void;
|
|
153
|
-
}
|
|
154
|
-
interface Garply {
|
|
155
|
-
f(...args: any[]): void;
|
|
156
|
-
}
|
|
157
|
-
```
|
|
158
|
-
|
|
159
130
|
## When Not To Use It
|
|
160
131
|
|
|
161
132
|
If an unknown type or a library without typings is used
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@typescript-eslint/eslint-plugin",
|
|
3
|
-
"version": "6.7.6-alpha.
|
|
3
|
+
"version": "6.7.6-alpha.5+cff6e4729",
|
|
4
4
|
"description": "TypeScript plugin for ESLint",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -57,10 +57,10 @@
|
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
59
|
"@eslint-community/regexpp": "^4.5.1",
|
|
60
|
-
"@typescript-eslint/scope-manager": "6.7.6-alpha.
|
|
61
|
-
"@typescript-eslint/type-utils": "6.7.6-alpha.
|
|
62
|
-
"@typescript-eslint/utils": "6.7.6-alpha.
|
|
63
|
-
"@typescript-eslint/visitor-keys": "6.7.6-alpha.
|
|
60
|
+
"@typescript-eslint/scope-manager": "6.7.6-alpha.5+cff6e4729",
|
|
61
|
+
"@typescript-eslint/type-utils": "6.7.6-alpha.5+cff6e4729",
|
|
62
|
+
"@typescript-eslint/utils": "6.7.6-alpha.5+cff6e4729",
|
|
63
|
+
"@typescript-eslint/visitor-keys": "6.7.6-alpha.5+cff6e4729",
|
|
64
64
|
"debug": "^4.3.4",
|
|
65
65
|
"graphemer": "^1.4.0",
|
|
66
66
|
"ignore": "^5.2.4",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"@types/natural-compare": "*",
|
|
75
75
|
"@types/prettier": "*",
|
|
76
76
|
"@typescript-eslint/rule-schema-to-typescript-types": "6.7.5",
|
|
77
|
-
"@typescript-eslint/rule-tester": "6.7.6-alpha.
|
|
77
|
+
"@typescript-eslint/rule-tester": "6.7.6-alpha.5+cff6e4729",
|
|
78
78
|
"ajv": "^6.12.6",
|
|
79
79
|
"chalk": "^5.3.0",
|
|
80
80
|
"cross-fetch": "*",
|
|
@@ -103,5 +103,5 @@
|
|
|
103
103
|
"type": "opencollective",
|
|
104
104
|
"url": "https://opencollective.com/typescript-eslint"
|
|
105
105
|
},
|
|
106
|
-
"gitHead": "
|
|
106
|
+
"gitHead": "cff6e472996c6ccdd672be09d033d2e0a67d5687"
|
|
107
107
|
}
|