From 22c22180d2cda4dba4f96bcadc73cd3034a1f0eb Mon Sep 17 00:00:00 2001 From: JunichiSugiura Date: Wed, 14 Aug 2024 16:10:11 +0200 Subject: [PATCH] Check format also on lint script --- .github/workflows/test.yml | 4 ++-- examples/starknet-react-next/package.json | 3 ++- package.json | 2 +- packages/connector/package.json | 3 ++- packages/controller/package.json | 3 ++- packages/keychain/package.json | 3 ++- packages/ui-next/package.json | 3 ++- packages/ui/package.json | 3 ++- turbo.json | 1 + 9 files changed, 16 insertions(+), 9 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5e3060ecc..dd68067a4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,7 +11,7 @@ env: RUST_VERSION: 1.78.0 jobs: - rust-test: + rust: runs-on: ubuntu-latest container: image: ghcr.io/dojoengine/dojo-dev:v1.0.0-alpha.0 @@ -29,7 +29,7 @@ jobs: token: ${{ secrets.CODECOV_TOKEN }} files: lcov.info - ts-test: + ts: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 diff --git a/examples/starknet-react-next/package.json b/examples/starknet-react-next/package.json index 65f63e8a4..9f506dcc4 100644 --- a/examples/starknet-react-next/package.json +++ b/examples/starknet-react-next/package.json @@ -9,7 +9,8 @@ "e2e:ui": "playwright test --ui", "start": "next start -p 3002", "lint": "next lint", - "format": "prettier --write ./src" + "format": "prettier --write ./src", + "format:check": "prettier --check ./src" }, "dependencies": { "@cartridge/connector": "workspace:^", diff --git a/package.json b/package.json index 7cc73c714..5a09e9a2d 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "dev": "turbo dev", "e2e": "turbo dev e2e", "e2e:ui": "turbo dev e2e:ui", - "lint": "turbo lint", + "lint": "turbo lint format:check", "format": "turbo format", "clean": "git clean -xdf && pnpm store prune", "release": "pnpm build && pnpm changeset publish", diff --git a/packages/connector/package.json b/packages/connector/package.json index ad2043203..4fc76221d 100644 --- a/packages/connector/package.json +++ b/packages/connector/package.json @@ -8,7 +8,8 @@ "scripts": { "build:deps": "tsc", "prepublish": "pnpm build:deps", - "format": "prettier --write \"src/**/*.ts\"" + "format": "prettier --write \"src/**/*.ts\"", + "format:check": "prettier --check \"src/**/*.ts\"" }, "files": [ "dist" diff --git a/packages/controller/package.json b/packages/controller/package.json index 1a2f74481..7be69ae85 100644 --- a/packages/controller/package.json +++ b/packages/controller/package.json @@ -7,7 +7,8 @@ "type": "module", "scripts": { "build:deps": "tsc", - "format": "prettier --write \"src/**/*.ts\"" + "format": "prettier --write \"src/**/*.ts\"", + "format:check": "prettier --check \"src/**/*.ts\"" }, "files": [ "dist" diff --git a/packages/keychain/package.json b/packages/keychain/package.json index 8b0e9f1ed..f9e06d6ac 100644 --- a/packages/keychain/package.json +++ b/packages/keychain/package.json @@ -7,7 +7,8 @@ "build": "TARGET_ORIGIN=\"https://x.cartridge.gg/\" next build", "start": "next start", "lint": "next lint", - "format": "prettier ./src --write", + "format": "prettier --write ./src", + "format:check": "prettier --check ./src", "test": "jest --watch", "test:ci": "jest --ci", "gen": "graphql-codegen --config codegen.yaml" diff --git a/packages/ui-next/package.json b/packages/ui-next/package.json index af1d4ae0e..db21d9533 100644 --- a/packages/ui-next/package.json +++ b/packages/ui-next/package.json @@ -24,7 +24,8 @@ "scripts": { "build:deps": "tsc && tsc-alias && pnpm copyThemes", "copyThemes": "cp -R src/themes dist/themes", - "format": "prettier ./src --write", + "format": "prettier --write ./src", + "format:check": "prettier --check ./src", "lint": "eslint . --ext ts,tsx", "storybook": "storybook dev -p 6006", "storybook:build": "storybook build" diff --git a/packages/ui/package.json b/packages/ui/package.json index 0ea88418d..d2e3e824a 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -6,7 +6,8 @@ "type": "module", "scripts": { "build:deps": "tsc", - "format": "prettier ./src --write", + "format": "prettier --write ./src", + "format:check": "prettier --check ./src", "storybook": "storybook dev -p 6006", "storybook:build": "storybook build" }, diff --git a/turbo.json b/turbo.json index 878d9efb6..2c25c1f85 100644 --- a/turbo.json +++ b/turbo.json @@ -17,6 +17,7 @@ }, "lint": {}, "format": {}, + "format:check": {}, "e2e": { "persistent": true },