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

Wrong .prettierignore file used when using multiple sub folders #3424

Closed
Kamahl19 opened this issue Jun 6, 2024 · 4 comments
Closed

Wrong .prettierignore file used when using multiple sub folders #3424

Kamahl19 opened this issue Jun 6, 2024 · 4 comments
Labels

Comments

@Kamahl19
Copy link

Kamahl19 commented Jun 6, 2024

Summary

I have a monorepo project with multiple packages. Each of the them contains a .prettierignore and .prettierrc. Plus one at the root of the project for files located in the root. When I'm saving a file, a .prettierrc config file which is located closest to the saved file is being used. This is correct behaviour. However this does not work correctly for the .prettierignore file. Only the .prettierirnogr in project root is always used, no matter which file is being saved. Instead the .prettierignore closest to the saved file should be used.

This is basically a follow-up of the issue (#3003) already closed by the bot.

Github Repository to Reproduce Issue

I am using this repo https://github.com/KirianCaumes/Prettier-VsCode-Bug which was already used in the duplicate issue #3003 which was closed by the bot.

Steps To Reproduce:

  1. Open the ./should-be-ignored.yml file, and save it. It should be skipped because of the ./.prettierignore.
  2. Open the ./front/should-not-be-ignored.yml file, and save it. It is wrongly skipped because the ./.prettierignore is being used. Instead, the ./front/.prettierignore should be used the file should not be skipped.

Expected result

When saving a file in a subfolder with it's own .prettierignore, this one should be used, not the one at the root of the project. The behaviour should be the same as for the .prettierrc config.

Actual result

The root .prettierignore is used instead of the closest one.

Additional information

VS Code Version:

Version: 1.89.1
Commit: dc96b837cf6bb4af9cd736aa3af08cf8279f7685
Date: 2024-05-07T05:14:32.757Z
Electron: 28.2.8
ElectronBuildId: 27744544
Chromium: 120.0.6099.291
Node.js: 18.18.2
V8: 12.0.267.19-electron.0
OS: Darwin arm64 23.5.0

Prettier Extension Version:

v10.4.0

OS and version:

MacOS 14.5

@StanlieK
Copy link

StanlieK commented Jun 7, 2024

I have the same issue

Copy link

github-actions bot commented Aug 7, 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 Aug 7, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 14, 2024
@Kamahl19
Copy link
Author

@ntotten I am sorry to bother you but this issue has been raised twice (#3003) and always closed by bot. Would you please comment whether this is something you plan to fix or not at all? Monorepos are suffering by this. Thanks a lot!

@Simon7520
Copy link

I have the same problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants