Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extension only looks for .gitignore or .prettierignore when using Prettier v3, does not allow both #3361

Open
MWhite-22 opened this issue Apr 1, 2024 · 0 comments

Comments

@MWhite-22
Copy link

Summary

I am using extension version 10.4 with prettier version 3.2.5 installed in my local node_modules.

Prettier v3 picks up both the .prettierignore files and the .gitignore file by default when running.

I assumed the extension would do the same now that it is using Prettier v3 does is does not appear to be doing that. It will only select the one specified in the prettier.ignore_path setting.

I've tried setting it to empty, null, .gitignore, and the default .prettierignore and none have the desired outcome.

Steps To Reproduce:

  1. Have a project with a .gitignore and a .prettierignore file that reference different paths
  2. Run npx prettier --write . and see that it will ignore all the files referenced in both locations
  3. Run the vscode extensions format functionality
  4. It'll only ignore the files in .prettierignore by default, or only .gitignore if the setting is changed

Expected result

When using prettier v3, both the .gitignore AND .prettierignore should be used to decide if a file is ignored or not.

Actual result

Only one file is used, whichever is setup in the prettier.ignore_path settings.

VS Code Version:

Version: 1.87.2 (Universal)
Commit: 863d2581ecda6849923a2118d93a088b0745d9d6
Date: 2024-03-08T15:21:31.043Z
Electron: 27.3.2
ElectronBuildId: 26836302
Chromium: 118.0.5993.159
Node.js: 18.17.1
V8: 11.8.172.18-electron.0
OS: Darwin arm64 23.4.0

Prettier Extension Version: 10.4

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

No branches or pull requests

1 participant