Skip to content

Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.

Run global prettier check (#1353)

Bogdan Chadkinb4d21aadffdd
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index b41509f12f..ea32a9fd27 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -16,4 +16,13 @@ jobs:
- uses: actions/checkout@v3
- uses: ./.github/actions/ci-setup
+ - uses: actions/cache@v3
+ with:
+ path: |
+ ./node_modules/.cache/prettier/.prettier-cache
+ key: checks-${{ github.sha }}
+ restore-keys: checks-
+
+ - run: pnpm prettier --cache --check "**/*.{js,md,ts,tsx}"
+
- run: pnpm turbo run size-test build checks
diff --git a/.prettierignore b/.prettierignore
index bd5535a603..e2738673d8 100644
--- a/.prettierignore
+++ b/.prettierignore
@@ -1 +1,2 @@
pnpm-lock.yaml
+packages/prisma-client/prisma/migrations/*/client
diff --git a/apps/builder/package.json b/apps/builder/package.json
index cb333d42e3..d513c15197 100644
--- a/apps/builder/package.json
+++ b/apps/builder/package.json
@@ -10,9 +10,8 @@
"typecheck": "tsc",
"lint": "eslint . --ext .ts,.tsx --max-warnings 0",
"test": "NODE_OPTIONS=--experimental-vm-modules jest",
- "checks": "pnpm lint && pnpm typecheck && pnpm prettier --check && pnpm test",
+ "checks": "pnpm lint && pnpm typecheck && pnpm test",
"watch:sdk": "relative-deps && relative-deps watch",
- "prettier": "prettier \"*.{js,md,json,ts}\" \"{docs,app}/**/*.{js,md,json,ts}\"",
"storybook:run": "start-storybook -p 6006",
"storybook:build": "build-storybook",
"ci:migrate": "migrations migrate --force"
@@ -121,7 +120,6 @@
"dotenv": "^16.0.0",
"html-tags": "^3.2.0",
"jest": "^29.3.1",
- "prettier": "^2.8.4",
"react-test-renderer": "^17.0.2",
"relative-deps": "^1.0.7",
"type-fest": "^3.7.1",
diff --git a/package.json b/package.json
index 017da674e2..d5234de488 100644
--- a/package.json
+++ b/package.json
@@ -28,7 +28,7 @@
"@webstudio-is/eslint-config-custom": "workspace:^",
"chromatic": "^6.11.4",
"nano-staged": "^0.8.0",
- "prettier": "2.8.4",
+ "prettier": "2.8.7",
"simple-git-hooks": "^2.8.1",
"tsx": "^3.12.6",
"turbo": "^1.8.6",
diff --git a/packages/fonts/src/font-weights.ts b/packages/fonts/src/font-weights.ts
index 04139d71fd..19bcc1586b 100644
--- a/packages/fonts/src/font-weights.ts
+++ b/packages/fonts/src/font-weights.ts
@@ -48,5 +48,5 @@ export const fontWeights = {
export type FontWeight = keyof typeof fontWeights;
export type FontWeightKeyword =
- | typeof fontWeights[FontWeight]["name"]
- | typeof fontWeights[FontWeight]["alt"];
+ | (typeof fontWeights)[FontWeight]["name"]
+ | (typeof fontWeights)[FontWeight]["alt"];
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index a935f942ea..5bea833d32 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -31,8 +31,8 @@ importers:
specifier: ^0.8.0
version: 0.8.0
prettier:
- specifier: 2.8.4
- version: 2.8.4
+ specifier: 2.8.7
+ version: 2.8.7
simple-git-hooks:
specifier: ^2.8.1
version: 2.8.1
@@ -349,9 +349,6 @@ importers:
jest:
specifier: ^29.3.1
version: 29.3.1(@types/[email protected])
- prettier:
- specifier: ^2.8.4
- version: 2.8.4
react-test-renderer:
specifier: ^17.0.2
version: 17.0.2([email protected])
@@ -16665,8 +16662,8 @@ packages:
hasBin: true
dev: true
- resolution: {integrity: sha512-vIS4Rlc2FNh0BySk3Wkd6xmwxB0FpOndW5fisM5H8hsZSxU2VWVB5CWIkIjWvrHjIhxk2g3bfMKM87zNTrZddw==}
+ resolution: {integrity: sha512-yPngTo3aXUUmyuTjeTUT75txrf+aMh9FiD7q9ZE/i6r0bPb22g4FsE6Y338PQX1bmfy08i9QQCB7/rcUAVntfw==}
engines: {node: '>=10.13.0'}
hasBin: true
dev: true