Skip to content

The new config types in 9.29.0 are broken #2574

Closed
@thebanjomatic

Description

@thebanjomatic

Checklist

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

Tell us about your environment

  • ESLint version: 9.11.0
  • eslint-plugin-vue version: 9.29.0
  • Vue version: 3.5.6
  • Node version: 20.18.0
  • Operating System: Windows 11

Please show your full configuration:

import eslintPluginVue from 'eslint-plugin-vue';

const baseConfigs = eslintPluginVue.configs['flat/base'];

What did you do?
When importing the configs, the types are essentially still any because the types Linter.FlatConfig and Linter.LegacyConfig are not actually imported or defined within your own declarations. This results in the type being treated as any if you have skipLibChecks set to true, or a build error if you don't.

image

What did you expect to happen?
Config types should use the actual eslint types in their definition instead of just being typed as any for consumers..

What actually happened?
Types for Linter are not being imported in the .d.ts file.
https://unpkg.com/browse/[email protected]/lib/index.d.ts

I believe its just missing an import at the top of the file. I'll file a PR.

Repository to reproduce this issue
None provided.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions