2

When I execute the following command in a root folder of a project, all the files recursively get run as I expect.

prettier --write "**/*.{js,ts}"

However, I want to ignore all folders that start with ./next or ./old in those subfolders. How can I do that? I've tried the commands below but they don't ignore those folders

prettier --write "**/*.{js,ts}" --ignore-path ".next"

prettier --write "/*.{js,ts}" --ignore-path "/.next"

Pete
  • 3,111
  • 6
  • 20
  • 43

1 Answers1

4

You can add .next or /.next to the .prettierignore file.

-- ignore-path is the path to a file containing patterns that describe files to ignore; It's not the folder to be ignored!!

Kindly read this

coolbeatz71
  • 928
  • 2
  • 10
  • 22