Skip to content

Commit

Permalink
chore(ci): make lint:prettier faster (#6207)
Browse files Browse the repository at this point in the history
Also removes the extra lint:prettier job in CI,
since `turbo run lint` already runs lint:prettier
as a dependency.
  • Loading branch information
mehulkar committed Oct 19, 2023
1 parent 185e912 commit 29f7646
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 10 deletions.
8 changes: 0 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -892,14 +892,6 @@ jobs:
target: ubuntu
github-token: "${{ secrets.GITHUB_TOKEN }}"

- name: Format check
# This is the syntax for running the `//#lint` task specifically in turbo.json
# It runs the taplo check on taplo.toml, and lint:prettier per workspace.
# Skip `cli` workspace for now. It has the lint task, but in GitHub CI
# we need to set up golangci-lint to make it work. Go linting is run in the "Go linting"
# job in this workflow. We can move that in here in the next step.
run: turbo run lint:prettier --filter=!cli

# excluded workspaces have not been fully migrated to @vercel/style-guide
- name: Lint check
run: turbo run lint --filter=!docs --filter=!cli --filter=!@vercel/devlow-bench --filter=!@vercel/experimental-nft-next-plugin --filter=!@vercel/experimental-nft-next-plugin --filter=!turbopack-bump-action --filter=!next-integration-stat
Expand Down
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ generated/
pnpm-lock.yaml

__generated__/
/benchmark/large-monorepo
/cli/dist-cross*
/docs/public/schema.json
/packages/eslint-plugin-turbo/__tests__/fixtures/
Expand Down
2 changes: 1 addition & 1 deletion benchmark/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"benchmark": "node -r esbuild-register src/index.ts",
"ttft": "node -r esbuild-register src/ttft.ts",
"lint": "eslint src",
"lint:prettier": "prettier -c . --cache --ignore-path=../.prettierignore",
"lint:prettier": "prettier -c src --cache --ignore-path=../.prettierignore",
"check-types": "tsc --noEmit"
},
"devDependencies": {
Expand Down
8 changes: 8 additions & 0 deletions benchmark/turbo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": ["//"],
"pipeline": {
"lint:prettier": {
"inputs": ["src/**/*"]
}
}
}
2 changes: 1 addition & 1 deletion cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"test": "make test-go",
"format": "make fmt-go",
"lint": "make lint-go",
"lint:prettier": "prettier -c . --cache --ignore-path=../.prettierignore"
"lint:prettier": "prettier -c ./**/*.js ./**/*.ts --cache --ignore-path=../.prettierignore"
},
"devDependencies": {
"copy-template-dir": "^1.4.0",
Expand Down

0 comments on commit 29f7646

Please sign in to comment.