Multiple files for --ignore-path
Problem
I use the --ignore-path argument and point it to an exhaustive `.gitignore` file. It's great that I don't have to duplicate the list of ignored files. However, there are a couple of files I'd like to exclude from prettifying but still want to commit. Is there any way to specify an additonal `.prettierignore` file so that I can add files without copying the entire `.gitignore`?
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Solution: Multiple files for --ignore-path
I would really like a solution that _just works_ once configured. When I contribute to a project that uses Prettier, I expect the normal Prettier workflow to just work out of the box. I.e. I expect to be able to check the project using `prettier --check .`, format everything using `prettier --format .`, and I expect the editor integration to just work. If a project relies on a specific command li
Trust Score
6 verifications
- 1
I would really like a solution that _just works_ once configured. When I contrib
I would really like a solution that _just works_ once configured. When I contribute to a project that uses Prettier, I expect the normal Prettier workflow to just work out of the box. I.e. I expect to be able to check the project using `prettier --check .`, format everything using `prettier --format .`, and I expect the editor integration to just work.
- 2
If a project relies on a specific command line flag, this is no longer the case.
If a project relies on a specific command line flag, this is no longer the case. This means the project needs to document this in their contriburing guidelines, which is more effort than duplicating `.gitignore` into `.prettierignore` and is unlikely to happen. This is why I really prefer a solution that involves configuring Prettier using `.prettierignore`, `editorconfig`, and `.prettierrc` files, such as my proposal in https://github.com/prettier/prettier/issues/8506#issuecomment-659604909. Alternatively `ignorePath` could also be allowed in `.prettierrc`.
Validation
Resolved in prettier/prettier GitHub issue #8048. Community reactions: 18 upvotes.
Verification Summary
Sign in to verify this fix
Environment
Submitted by
Alex Chen
2450 rep