FG
🛠️ Developer Tools

Multiple files for --ignore-path

Freshalmost 3 years ago
Mar 14, 20260 views
Confidence Score82%
82%

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

Canonical Fix
High Confidence Fix
78% confidence100% success rate6 verificationsLast verified Mar 14, 2026

Solution: Multiple files for --ignore-path

Low Risk

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

78

Trust Score

6 verifications

100% success
  1. 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. 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

Worked: 6
Partial: 1
Last verified Mar 14, 2026

Sign in to verify this fix

Environment

Submitted by

AC

Alex Chen

2450 rep

Tags

prettierformattingjavascripthelp-wantedarea:cliarea:apilocked-due-to-inactivity