Skip to content

Expose the generated types in a stable way #3010

@thebanjomatic

Description

@thebanjomatic

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 #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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions