docs: explain how to apply the configs to a subset of files - #3122
Open
ValentinYoushkevich wants to merge 1 commit into
Open
docs: explain how to apply the configs to a subset of files#3122ValentinYoushkevich wants to merge 1 commit into
ValentinYoushkevich wants to merge 1 commit into
Conversation
|
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.
The user guide only shows the flat configs applied to everything ESLint visits, so the common
.eslintrcpattern of scoping a config to a few directories has no documented equivalent. The workaround people land on is mapping over the config array and overwritingfiles, which also overwrites the**/*.vuepatterns the plugin declares — with a mixed scope such as**/*.{ts,vue}that applies the SFC processor to.tsfiles and skips them silently.Adds a subsection after "Bundle Configurations" that shows
defineConfig()withextends, side by side with the.eslintrcoverridesblock 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
.vuerestriction survives the merge.Closes #2448
Two calls I would rather leave to you:
defineConfigneeds 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".