Skip to content

docs: explain how to apply the configs to a subset of files - #3122

Open
ValentinYoushkevich wants to merge 1 commit into
vuejs:masterfrom
ValentinYoushkevich:docs/scoped-flat-config
Open

docs: explain how to apply the configs to a subset of files#3122
ValentinYoushkevich wants to merge 1 commit into
vuejs:masterfrom
ValentinYoushkevich:docs/scoped-flat-config

Conversation

@ValentinYoushkevich

Copy link
Copy Markdown
Contributor

The user guide only shows the flat configs applied to everything ESLint visits, so the common .eslintrc pattern of scoping a config to a few directories has no documented equivalent. The workaround people land on is mapping over the config array and overwriting files, which also overwrites the **/*.vue patterns the plugin declares — with a mixed scope such as **/*.{ts,vue} that applies the SFC processor to .ts files and skips them silently.

Adds a subsection after "Bundle Configurations" that shows defineConfig() with extends, side by side with the .eslintrc overrides block it replaces, and a warning box covering the ESLint 9.22 requirement and what to do below that version.

The examples were run against ESLint 10.8.1 to confirm the scoping actually holds and that the plugin's .vue restriction survives the merge.

Closes #2448

Two calls I would rather leave to you: defineConfig needs ESLint 9.22+ while the peer range still allows 8.57, which the warning box and the pre-9.22 fallback are meant to cover; and the section could equally sit next to the typescript-eslint example instead of after "Bundle Configurations".

@changeset-bot

changeset-bot Bot commented Aug 13, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: e86fcb1

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

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.

Full example for flat config with object

1 participant