Skip to content

Commit

Permalink
Run prettier per-workspace to take advantage of turbo caching
Browse files Browse the repository at this point in the history
  • Loading branch information
Turbobot committed May 3, 2023
1 parent 62e4350 commit 1a9349b
Show file tree
Hide file tree
Showing 25 changed files with 239 additions and 25 deletions.
3 changes: 2 additions & 1 deletion .github/actions/cargo-sweep/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"build:main": "ncc build src/main.js -o dist/main --source-map",
"build:post": "ncc build src/post.js -o dist/post --source-map",
"prepare": "pnpm run build:main && pnpm run build:post",
"lint": "eslint . --ext js,jsx,ts,tsx"
"lint": "eslint . --ext js,jsx,ts,tsx",
"lint:prettier": "prettier -c . --ignore-path=../../../.prettierignore"
},
"dependencies": {
"@actions/core": "^1.10.0",
Expand Down
3 changes: 2 additions & 1 deletion .github/actions/next-integration-stat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"private": true,
"main": "src/index.js",
"scripts": {
"pack": "ncc -t -o . build src/index.ts"
"pack": "ncc -t -o . build src/index.ts",
"lint:prettier": "prettier -c ."
},
"devDependencies": {
"@types/node": "^18.11.18",
Expand Down
3 changes: 2 additions & 1 deletion .github/actions/turbopack-bump/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"version": "1.0.0",
"scripts": {
"build": "ncc build src/index.ts -o dist --source-map --minify",
"prepare": "pnpm run build"
"prepare": "pnpm run build",
"lint:prettier": "prettier -c . --ignore-path=../../../.prettierignore"
},
"dependencies": {
"@actions/core": "^1.10.0",
Expand Down
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.next/
build/
dist/
dist
node_modules/
target/
coverage/
Expand Down
3 changes: 2 additions & 1 deletion benchmark/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"ndjson": "^2.0.0"
},
"scripts": {
"benchmark": "node -r esbuild-register src/index.ts"
"benchmark": "node -r esbuild-register src/index.ts",
"lint:prettier": "prettier -c . --ignore-path=../.prettierignore"
},
"devDependencies": {
"@types/node": "^16.11.49"
Expand Down
Empty file added cli/.prettierignore
Empty file.
3 changes: 2 additions & 1 deletion cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"build": "make",
"test": "make test-go",
"format": "make fmt-go",
"lint": "make lint-go"
"lint": "make lint-go",
"lint:prettier": "prettier -c . --ignore-path=../.prettierignore"
},
"devDependencies": {
"copy-template-dir": "^1.4.0",
Expand Down
14 changes: 14 additions & 0 deletions crates/next-dev-tests/test-harness/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "@turbo/pack-test-harness",
"private": true,
"version": "0.0.1",
"main": "./harness.ts",
"dependencies": {
"expect": "^24.5.0",
"jest-circus": "^29.4.1",
"jest-circus-browser": "^1.0.7"
},
"scripts": {
"lint:prettier": "prettier -c ."
}
}
23 changes: 23 additions & 0 deletions crates/next-dev-tests/tests/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "next-dev-tests",
"private": true,
"devDependencies": {
"@babel/preset-typescript": "7.21.0",
"@turbo/pack-test-harness": "file:../test-harness",
"@types/jest": "29.4.0",
"@types/node": "^18.14.0",
"autoprefixer": "^10.4.13",
"babel-loader": "^9.1.2",
"loader-runner": "^4.3.0",
"next": "13.1.7-canary.28",
"postcss": "^8.4.20",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-test-renderer": "^18.2.0",
"styled-jsx": "^5.1.0",
"tailwindcss": "^3.2.4"
},
"scripts": {
"lint:prettier": "prettier -c ."
}
}
3 changes: 2 additions & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"build": "next build ",
"lint": "next lint",
"rss": "node scripts/generate-rss.js",
"schema": "turbo-types-generate ./public/schema.json"
"schema": "turbo-types-generate ./public/schema.json",
"lint:prettier": "prettier -c . --ignore-path=../.prettierignore"
},
"author": "Jared Palmer",
"license": "MPL-2.0",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"build": "pnpm -- turbo run build --filter=docs",
"build:turbo": "pnpm run --filter=cli build",
"build:ts": "tsc -b tsconfig.project.json",
"check:prettier": "prettier -c .",
"lint:prettier": "pnpm -- turbo run lint:prettier",
"check:toml": "taplo format --check",
"format": "run-p format:prettier format:rs format:toml",
"format:prettier": "prettier -w .",
Expand Down
3 changes: 2 additions & 1 deletion packages/create-turbo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
"build": "tsup",
"test": "jest",
"lint": "eslint src/**/*.ts",
"check-types": "tsc --noEmit"
"check-types": "tsc --noEmit",
"lint:prettier": "prettier -c . --ignore-path=../../.prettierignore"
},
"dependencies": {
"async-retry": "^1.3.3",
Expand Down
3 changes: 3 additions & 0 deletions packages/eslint-config-turbo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
"bugs": {
"url": "https://github.com/vercel/turbo/issues"
},
"scripts": {
"lint:prettier": "prettier -c ."
},
"keywords": [
"turbo",
"eslint",
Expand Down
3 changes: 2 additions & 1 deletion packages/eslint-plugin-turbo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
"test": "jest",
"build": "tsup",
"check-types": "tsc --noEmit",
"lint": "eslint lib/**/*.ts"
"lint": "eslint lib/**/*.ts",
"lint:prettier": "prettier -c . --ignore-path=../../.prettierignore"
},
"devDependencies": {
"@types/eslint": "^8.4.5",
Expand Down
3 changes: 2 additions & 1 deletion packages/turbo-codemod/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
"test": "jest",
"lint": "eslint src/**/*.ts",
"check-types": "tsc --noEmit",
"add-transformer": "plop"
"add-transformer": "plop",
"lint:prettier": "prettier -c . --ignore-path=../../.prettierignore"
},
"dependencies": {
"axios": "0.27.2",
Expand Down
3 changes: 2 additions & 1 deletion packages/turbo-ignore/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
"build": "tsup",
"test": "jest",
"lint": "eslint src/**/*.ts",
"check-types": "tsc --noEmit"
"check-types": "tsc --noEmit",
"lint:prettier": "prettier -c . --ignore-path=../../.prettierignore"
},
"devDependencies": {
"@types/jest": "^27.4.0",
Expand Down
3 changes: 2 additions & 1 deletion packages/turbo-test-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
},
"scripts": {
"lint": "eslint src/**/*.ts",
"check-types": "tsc --noEmit"
"check-types": "tsc --noEmit",
"lint:prettier": "prettier -c ."
},
"devDependencies": {
"@types/fs-extra": "^9.0.13",
Expand Down
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 . --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 ."
},
"dependencies": {
"mongoose": "^6.4.5",
Expand Down
3 changes: 2 additions & 1 deletion packages/turbo-types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"ts-json-schema-generator": "1.1.2"
},
"scripts": {
"lint": "eslint src/**/*.ts"
"lint": "eslint src/**/*.ts",
"lint:prettier": "prettier -c ."
},
"devDependencies": {
"@turbo/tsconfig": "workspace:^0.0.0"
Expand Down
1 change: 1 addition & 0 deletions packages/turbo-utils/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dist/
3 changes: 2 additions & 1 deletion packages/turbo-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
"build": "tsup",
"test": "jest",
"lint": "eslint src/**/*.ts",
"check-types": "tsc --noEmit"
"check-types": "tsc --noEmit",
"lint:prettier": "prettier -c ."
},
"devDependencies": {
"@manypkg/find-root": "^1.1.0",
Expand Down
3 changes: 2 additions & 1 deletion packages/turbo-workspaces/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"dev": "tsup --watch",
"test": "jest",
"lint": "eslint src/**/*.ts",
"check-types": "tsc --noEmit"
"check-types": "tsc --noEmit",
"lint:prettier": "prettier -c . --ignore-path=../../.prettierignore"
},
"dependencies": {
"chalk": "2.4.2",
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 . --ignore-path=../../.prettierignore"
}
}
Loading

0 comments on commit 1a9349b

Please sign in to comment.