@typescript-eslint/eslint-plugin 6.9.1-alpha.3 → 6.9.1-alpha.4
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.
|
@@ -127,8 +127,16 @@ interface Garply {
|
|
|
127
127
|
|
|
128
128
|
## When Not To Use It
|
|
129
129
|
|
|
130
|
-
|
|
131
|
-
|
|
130
|
+
`any` is always a dangerous escape hatch.
|
|
131
|
+
Whenever possible, it is always safer to avoid it.
|
|
132
|
+
TypeScript's `unknown` is almost always preferable to `any`.
|
|
133
|
+
|
|
134
|
+
However, there are occasional situations where it can be necessary to use `any`.
|
|
135
|
+
Most commonly:
|
|
136
|
+
|
|
137
|
+
- If your project isn't fully onboarded to TypeScript yet, `any` can be temporarily used in places where types aren't yet known or representable
|
|
138
|
+
- If an external package doesn't yet have typings and you want to use `any` pending adding a `.d.ts` for it
|
|
139
|
+
- You're working with particularly complex or nuanced code that can't yet be represented in the TypeScript type system
|
|
132
140
|
|
|
133
141
|
## Related To
|
|
134
142
|
|
|
@@ -140,4 +148,5 @@ and you want to be able to specify `any`.
|
|
|
140
148
|
|
|
141
149
|
## Further Reading
|
|
142
150
|
|
|
143
|
-
- TypeScript [any type](https://www.typescriptlang.org/docs/handbook/
|
|
151
|
+
- TypeScript [`any` type documentation](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)
|
|
152
|
+
- TypeScript [`unknown` type release notes](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-0.html#new-unknown-top-type)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@typescript-eslint/eslint-plugin",
|
|
3
|
-
"version": "6.9.1-alpha.
|
|
3
|
+
"version": "6.9.1-alpha.4+3300fa15d",
|
|
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.9.1-alpha.
|
|
61
|
-
"@typescript-eslint/type-utils": "6.9.1-alpha.
|
|
62
|
-
"@typescript-eslint/utils": "6.9.1-alpha.
|
|
63
|
-
"@typescript-eslint/visitor-keys": "6.9.1-alpha.
|
|
60
|
+
"@typescript-eslint/scope-manager": "6.9.1-alpha.4+3300fa15d",
|
|
61
|
+
"@typescript-eslint/type-utils": "6.9.1-alpha.4+3300fa15d",
|
|
62
|
+
"@typescript-eslint/utils": "6.9.1-alpha.4+3300fa15d",
|
|
63
|
+
"@typescript-eslint/visitor-keys": "6.9.1-alpha.4+3300fa15d",
|
|
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/marked": "*",
|
|
75
75
|
"@types/natural-compare": "*",
|
|
76
76
|
"@typescript-eslint/rule-schema-to-typescript-types": "6.9.0",
|
|
77
|
-
"@typescript-eslint/rule-tester": "6.9.1-alpha.
|
|
77
|
+
"@typescript-eslint/rule-tester": "6.9.1-alpha.4+3300fa15d",
|
|
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": "3300fa15d07e774a037000d208da02de048ac062"
|
|
107
107
|
}
|