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

Closed
MWhite-22 opened this issue Apr 1, 2024 · 3 comments
Labels
locked Please open a new issue and fill out the template instead of commenting. Stale

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

Copy link

github-actions bot commented Jun 1, 2024

This issue has been labeled as stale due to inactivity. Reply to keep this issue open.

@github-actions github-actions bot added the Stale label Jun 1, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jun 9, 2024
@MWhite-22
Copy link
Author

BUMPing this issue as I dont think it's been resolved yet...

Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot added the locked Please open a new issue and fill out the template instead of commenting. label Sep 10, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked Please open a new issue and fill out the template instead of commenting. Stale
Projects
None yet
Development

No branches or pull requests

1 participant