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.
There are several files that aren't currently being formatted by Prettier. I've tried to expand that to include more files.
mjs
andmts
extensions.*.html
tolint-staged
.lint:script
to cover more files inpackages
, as well asscripts
.Changing the paths in
lint:script
is probably the trickiest part. It's not entirely clear to me whether I've got those paths correct.It's worth noting that
lint-staged
doesn't take those paths into account, it just formats anything with the appropriate extensions. However, it only formats staged files, so anything in.gitignore
is implicitly ignored bylint-staged
.Prettier 3 does take the root
.gitignore
into account, but it doesn't consider nested.gitignore
files, which are being used in this project. I needed to add the VitePress cache to.prettierignore
to account for that. Perhaps other files should be added too, but it wasn't clear to me what some of the things in the nested.gitignore
files were.There are also 3 VitePress config files in this PR with minor formatting tweaks. These are files that are now picked up by
lint:script
that weren't previously. They should have already been picked up bylint-staged
, but prior to #2466 that wasn't working for most people.