Skip to content

feat: add withVueTs config helper#302

Open
haoqunjiang wants to merge 2 commits into
mainfrom
refactor/with-vue-ts
Open

feat: add withVueTs config helper#302
haoqunjiang wants to merge 2 commits into
mainfrom
refactor/with-vue-ts

Conversation

@haoqunjiang

@haoqunjiang haoqunjiang commented Jun 5, 2026

Copy link
Copy Markdown
Member

defineConfigWithVueTs depended on placeholder config objects. Those objects became valid only after the helper resolved them. That made interop with ESLint defineConfig() awkward.

This refactor adds withVueTs(...) as the async config helper.

  • vueTsConfigs exposes tagged flat config objects.
  • withVueTs(...) flattens user configs and resolves tagged configs.
  • Existing defineConfigWithVueTs(...) configs continue to work and run through the same transform.

The migration command rewrites common legacy configs to this new API. It parses each config with ESLint, records the imports and default export shape, and applies text edits from AST ranges. Unsupported shapes are reported for manual migration.

`defineConfigWithVueTs` depended on placeholder config objects.
Those objects became valid only after the helper resolved them.
That made interop with ESLint `defineConfig()` awkward.

This refactor adds `withVueTs(...)` as the async config helper.

- `vueTsConfigs` exposes tagged flat config objects.
- `withVueTs(...)` flattens user configs and resolves tagged configs.
- Existing `defineConfigWithVueTs(...)` configs continue to work and
  run through the same transform.

The migration command rewrites common legacy configs for 14.9.
It parses each config with ESLint, records the imports and default
export shape, and applies text edits from AST ranges.
Unsupported shapes are reported for manual migration.
The withVueTs export smoke test only needs to verify that ESLint can
load an async config helper from eslint.config.js.

Use the lighter recommended preset in the fixture, so the test does not
start TypeScript project service linting. Keep type-aware coverage in
memory by checking that recommendedTypeChecked still adds the project
service configs.
@haoqunjiang haoqunjiang changed the title feat: add withVueTs config helper feat: add withVueTs config helper Jun 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant