Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The new config types in 9.29.0 are broken #2574

Closed
2 tasks done
thebanjomatic opened this issue Oct 14, 2024 · 2 comments · Fixed by #2572
Closed
2 tasks done

The new config types in 9.29.0 are broken #2574

thebanjomatic opened this issue Oct 14, 2024 · 2 comments · Fixed by #2572

Comments

@thebanjomatic
Copy link

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.

@thebanjomatic
Copy link
Author

@FloEdelmann are you able to push a release for this change, or does this project release on a schedule?

@FloEdelmann
Copy link
Member

I can't but @ota-meshi could 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants