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

Type of ComponentExposed does not seem to be properly detected #2956

Open
@mitar

Description

@mitar

Checklist

  • I have tried restarting my IDE and the issue persists.
  • I have read theFAQ and my problem is not listed.

Tell us about your environment

  • ESLint version: 9.39.1
  • eslint-plugin-vue version: 10.5.0
  • Vue version: 3.5.22
  • Node version: 24.11.1
  • Operating System: Ubuntu 24.04

Please show your full configuration:

import{includeIgnoreFile}from"@eslint/compat";importeslintfrom"@eslint/js";importtseslintfrom"typescript-eslint";importeslintPluginVuefrom'eslint-plugin-vue';importvueParserfrom'vue-eslint-parser'importglobalsfrom"globals";importpathfrom"node:path";import{fileURLToPath}from"node:url";const__filename=fileURLToPath(import.meta.url);const__dirname=path.dirname(__filename);constgitignorePath=path.resolve(__dirname,".gitignore");exportdefaulttseslint.config(eslint.configs.recommended,  ...tseslint.configs.recommendedTypeChecked,  ...eslintPluginVue.configs['flat/recommended'],includeIgnoreFile(gitignorePath),{files:["**/*.{js,vue,ts,html}"],rules:{"no-unused-vars":"off","no-undef":"off","@typescript-eslint/switch-exhaustiveness-check":"error","@typescript-eslint/no-unused-vars":["error",{args:"none",caughtErrors:"none",},],"vue/multi-word-component-names":["off"],},languageOptions:{ecmaVersion:"latest",sourceType:"module",globals:{        ...globals.browser,        ...globals.es2025,},parser:vueParser,parserOptions:{extraFileExtensions:[".vue",".html"],parser:tseslint.parser,projectService:{allowDefaultProject:["*.js","*.html"],},tsconfigRootDir:__dirname,},},},)

What did you do?

I am trying to enable eslint with type checking on Vue project (usingtseslint.configs.recommendedTypeChecked and@typescript-eslint/switch-exhaustiveness-check.

What did you expect to happen?

eslint should find real typing issues.

What actually happened?

It finds typing issues which vue-tsc does not find and which bydocumentation should work. Namely, it detects the type ofComponentExposed asany.

Repository to reproduce this issue

https://github.com/mitar/vue-eslint-issue

Runnpm run lint:

> vue-project@0.0.0 lint> eslint . --fix --cache/tmp/vue-project/src/components/TheWelcome.vue  14:31  error  'any' overrides all other types in this union type  @typescript-eslint/no-redundant-type-constituents/tmp/vue-project/src/main.ts  6:11  error  Unsafe argument of type error typed assigned to a parameter of type `Component<any, any, any, ComputedOptions, MethodOptions, {}, any>`  @typescript-eslint/no-unsafe-argument✖ 2 problems (2 errors, 0 warnings)

The problematic to me is the first error because it says thatComponentExposed<typeof EcosystemIcon> is inferred intoany. Which is unexpected.

On the other hand, runningnpm run type-check does not produce any errors, even withstrict set.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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