Repository navigation
Conversation
This was referenced Oct 18, 2026
Member
Author
|
Going to do this in #192 |
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.
Supports config files at
.config/dprint.jsonand.config/dprint.jsonc, matching dprint/dprint#1369. The CLI treats a.configdirectory as part of its parent directory, and the extension now does the same:findConfigFileInAncestorDirectoriesandAncestorConfigFileCache): after the existing names, the lookup checks.config/dprint.json(c), but only when a.configdirectory exists. A.configdirectory is searched as part of its parent directory. The home directory's.config(ex.~/.config) is an ordinary directory..configdirectory. That's whatFolderService.urinow returns, which is used to match files to their config file and to search for an npm-installed dprint. It's also used for the loose folder cwd and for which ancestor config files are watched..config/dprint.json(c)too. Creating adprint.jsonbeside a.configdirectory therefore restarts dprint, since the CLI then uses that file instead. The workspace-wide watcher andfindFilesglob (**/{dprint,.dprint}.{json,jsonc}) already matched.config/dprint.json..config/dprint.jsonshadowed by adprint.jsonbeside the.configdirectory, or a.config/.dprint.json. Duplicates in the same directory (ex.dprint.jsonand.dprint.json) now also resolve to the one the CLI uses, instead of creating a folder for each.Formatting with a
.configconfig file needs a dprint version with dprint/dprint#1369. Older versions use.configas the config's base directory when it's passed via--config, so they only format the files within.config.