feat: add withVueTs config helper#302
Open
haoqunjiang wants to merge 2 commits into
Open
Conversation
`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.
withVueTs config helper
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
defineConfigWithVueTsdepended on placeholder config objects. Those objects became valid only after the helper resolved them. That made interop with ESLintdefineConfig()awkward.This refactor adds
withVueTs(...)as the async config helper.vueTsConfigsexposes tagged flat config objects.withVueTs(...)flattens user configs and resolves tagged configs.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.