-
-
Notifications
You must be signed in to change notification settings - Fork 501
Description
Preflight Checklist
- I have searched existing issues and this is not a duplicate
- This is a feature for the VS Code extension, not for Prettier's formatting behavior
Problem Description
When using this extension to format code, it only respects patterns in the .prettierignore file and ignores patterns from .gitignore. While you can specify an ignore file via the prettier.ignorePath setting, this doesn't allow both files to be considered simultaneously.
Proposed Solution
By default, respect patterns from both .gitignore and .prettierignore files. When patterns exist in both files, they should both be applied.
Alternatives Considered
Update the prettier.ignorePath setting to support multiple ignore file paths, for example:
{
"prettier.ignorePath": [".gitignore", ".prettierignore"]
}Additional Context
Since Prettier v3.0.0, it has respected both .gitignore and .prettierignore files by default (reference). However, this extension has only respected .prettierignore, creating an inconsistency in behavior. With the extension moving toward v12, this is a good opportunity to align it with Prettier's default behavior.