vuejs / eslint-plugin-vue

Official ESLint plugin for Vue.js
https://eslint.vuejs.org/
MIT License
4.47k stars 667 forks source link

The new config types in 9.29.0 are broken #2574

Closed thebanjomatic closed 1 month ago

thebanjomatic commented 1 month ago

Checklist

Tell us about your environment

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/eslint-plugin-vue@9.29.0/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 commented 1 month ago

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

FloEdelmann commented 1 month ago

I can't but @ota-meshi could :slightly_smiling_face: