Expose the generated types in a stable way
<!--
Before proposing changes, please make sure it hasn't been posted already.
You can see all open propositions here:
https://github.com/vuejs/eslint-plugin-vue/issues?q=is%3Aopen+is%3Aissue+label%3A%22new+rule+proposition%22
-->
**Tell us about your environment**
- **ESLint version:** 9.39.2
- **eslint-plugin-vue version:** 10.7.0
- **Vue version:** 3.4.x
- **Node version:** 24.18.0
**The problem you want to solve.**
In 10.4.0 typescript type augmentation of the eslint types was disabled. See https://github.com/vuejs/eslint-plugin-vue/issues/2788
Generally, I'm fine with this, but the types aren't able to be accessed in a consistent and reliable way since previously we could `import {RuleOptions as VueRuleOptions} from 'eslint-plugin-vue/lib/eslint-typegen.d.ts'` but in 10.7.0, the import path changed to: `eslint-plugin-vue/dist/eslint-typegen.d.ts`.
**Your take on the correct solution to problem.**
I'm not a fan of reaching into undeclared exports of a package like this, so a few ideas I guess are:
1. Add an `exports` field to package.json to declare a `./types` export to point to this package.
2. Re-export these types from the index.js
**Additional context**
0 条评论