Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[no-unsafe-*] rules are triggered on members imported from Vue component modules #2865

Closed
Labels
package: eslint-pluginIssues related to @typescript-eslint/eslint-pluginwontfixThis will not be worked on
@6XGate

Description

@6XGate
  • I have tried restarting my IDE and the issue persists.
  • I have updated to the latest version of the packages.
  • I haveread the FAQ and my problem is not listed.

Repro

https://github.com/6XGate/VueTypeSciprtLinting/tree/main/src/page/home/parts

Inthis 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 doesnot 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.tsModule 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.vueModule 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

packageversion
@typescript-eslint/eslint-plugin4.9.1
@typescript-eslint/parser4.9.1
TypeScript4.1.2
ESLint7.15.0
node12.19.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    package: eslint-pluginIssues related to @typescript-eslint/eslint-pluginwontfixThis will not be worked on

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp