Multiple files for --ignore-path

See original GitHub issue

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?

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:61
  • Comments:22 (5 by maintainers)

github_iconTop GitHub Comments

14reactions
remcohaszingcommented, Apr 25, 2022

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 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.

13reactions
bennycodecommented, Feb 6, 2022

Is it difficult to extend the –ignore-path so it can accept a comma-separated list of files?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to specify multiple file types to exclude when deleting ...
Use the -Exclude parameter, which allows you to specify an array of exclusion wildcard patterns - but see the caveats below:
Read more >
rsync: How to exclude multiple file types? - Unix StackExchange
First of all, your first example works - what's wrong with using that? If you really don't want to do that, try --exclude=*....
Read more >
How to use Rsync to exclude Files and Directories in Data ...
When you need to exclude a large number of different files and directories, you can use the rsync --exclude-from flag. To do so,...
Read more >
Exclude multiple files - SonarQube - Sonar Community
I am running Community Edition v7.4.18908. Team City is my CI tool When I try to exclude multiple files from code coverage I...
Read more >
GNU tar 1.34: 6.4 Excluding Some Files
You may give multiple ' --exclude ' options. ' --exclude-from= file '; ' -X file '. Causes tar to ignore files that match...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found