Description
- I have tried restarting my IDE and the issue persists.
- I have updated to the latest version of the packages.
- I have read the FAQ and my problem is not listed.
Repro
https://github.com/6XGate/VueTypeSciprtLinting/tree/main/src/page/home/parts
In this example project, WebPack cannot compile the project with ESLint enabled due to many of the [no-unsafe-*]
rules. Disabling it allows it to compile just fine. You can change some of the calls or properties accessed on the Vue components to something that does not exist, and TypeScript will not allow you to compile the project demonstrating that it knows the type information.
ESLint config: in repo
TS config: in repo
index.ts: in repo
HomePage component: in repo
Counter component: in repo
Expected Result
This project should compile without any problems and not have any safety holes as detected by these rules.
Actual Result
The project will display errors related to the various [no-unsafe-*]
rules.
ERROR Failed to compile with 2 errors 9:34:51 AM
error in ./src/index.ts
Module Error (from ./node_modules/eslint-loader/dist/cjs.js):
/home/matthew/Projects/VueTypeSciprtLinting/src/index.ts:6:15: Unsafe assignment of an any value. [Error/@typescript-eslint/no-unsafe-assignment]
/home/matthew/Projects/VueTypeSciprtLinting/src/index.ts:6:22: Unsafe construction of an any type value. [Error/@typescript-eslint/no-unsafe-call]
/home/matthew/Projects/VueTypeSciprtLinting/src/index.ts:8:9: Unsafe member access .$mount on an any value. [Error/@typescript-eslint/no-unsafe-member-access]
/home/matthew/Projects/VueTypeSciprtLinting/src/index.ts:8:9: Unsafe call of an any typed value. [Error/@typescript-eslint/no-unsafe-call]
4 problems
@ multi ./src/index.ts ./src/index.scss
error in ./src/page/home/HomePage.vue
Module Error (from ./node_modules/eslint-loader/dist/cjs.js):
/home/matthew/Projects/VueTypeSciprtLinting/src/page/home/HomePage.vue:18:19: Unsafe assignment of an any value. [Error/@typescript-eslint/no-unsafe-assignment]
/home/matthew/Projects/VueTypeSciprtLinting/src/page/home/HomePage.vue:25:7: Unsafe member access .inc on an any value. [Error/@typescript-eslint/no-unsafe-member-access]
/home/matthew/Projects/VueTypeSciprtLinting/src/page/home/HomePage.vue:25:7: Unsafe call of an any typed value. [Error/@typescript-eslint/no-unsafe-call]
3 problems
As far as I can tell, ESLint did not throw any exceptions.
Versions
package | version |
---|---|
@typescript-eslint/eslint-plugin |
4.9.1 |
@typescript-eslint/parser |
4.9.1 |
TypeScript |
4.1.2 |
ESLint |
7.15.0 |
node |
12.19.0 |