Skip to content

Commit

Permalink
Run prettier in individual workspaces (vercel/turborepo#3925)
Browse files Browse the repository at this point in the history
This adds a `lint:prettier` task in each workspace so that we can get
the benefits of a granular cache and when running prettier, we don't
have to run it across the entire monorepo (notably the `benchmark/`
workspace which is very slow to run prettier on, and rarely changes --
an ideal candidate for a cache hit)
  • Loading branch information
mehulkar committed Jun 2, 2023
1 parent 7a32cec commit 0c82236
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion packages/turbo-tracing-next-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"next": "^13.0.6"
},
"scripts": {
"lint": "eslint src/**/*.ts"
"lint": "eslint src/**/*.ts",
"lint:prettier": "prettier -c . --cache --ignore-path=../../.prettierignore"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"scripts": {
"dev": "next dev",
"build": "cross-env MONGODB_URI=localhost:27017 next build",
"start": "next start"
"start": "next start",
"lint:prettier": "prettier -c . --cache --ignore-path=../../../../.prettier-ignore"
},
"dependencies": {
"mongoose": "^6.4.5",
Expand Down
3 changes: 2 additions & 1 deletion packages/webpack-nmt/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"webpack": "^5.75.0"
},
"scripts": {
"lint": "eslint src/**/*.ts"
"lint": "eslint src/**/*.ts",
"lint:prettier": "prettier -c . --cache --ignore-path=../../.prettierignore"
}
}

0 comments on commit 0c82236

Please sign in to comment.