From 12a61f2f30370b7b4872dca5aea52f21ccbff2d0 Mon Sep 17 00:00:00 2001 From: Wojciech Maj Date: Mon, 15 Apr 2024 15:44:40 +0200 Subject: [PATCH] Rename prettier command to format --- .github/workflows/ci.yml | 8 ++++---- .lintstagedrc.json | 2 +- package.json | 2 +- packages/react-calendar/package.json | 4 ++-- test/package.json | 6 +++--- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f39152f8..174966c0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -80,8 +80,8 @@ jobs: - name: Run type checking run: yarn tsc - prettier: - name: Prettier + format: + name: Formatting runs-on: ubuntu-latest steps: @@ -109,8 +109,8 @@ jobs: - name: Install dependencies run: yarn --immutable - - name: Prettier - run: yarn prettier + - name: Run formatting + run: yarn format unit: name: Unit tests diff --git a/.lintstagedrc.json b/.lintstagedrc.json index 383e54fb..6cb3ca64 100644 --- a/.lintstagedrc.json +++ b/.lintstagedrc.json @@ -1,3 +1,3 @@ { - "*.{css,html,js,json,jsx,md,ts,tsx,yml}": "prettier --write" + "*.{css,html,js,json,jsx,md,ts,tsx,yml}": "yarn format --write" } diff --git a/package.json b/package.json index c61eba06..d2adbadb 100644 --- a/package.json +++ b/package.json @@ -11,9 +11,9 @@ "scripts": { "build": "yarn workspace react-calendar build", "dev": "yarn workspace react-calendar watch & yarn workspace test dev", + "format": "yarn workspaces foreach --all run format", "lint": "yarn workspaces foreach --all run lint", "postinstall": "husky", - "prettier": "yarn workspaces foreach --all run prettier", "test": "yarn workspaces foreach --all run test", "tsc": "yarn workspaces foreach --all run tsc", "unit": "yarn workspaces foreach --all run unit" diff --git a/packages/react-calendar/package.json b/packages/react-calendar/package.json index d034fa78..1e2e4ca9 100644 --- a/packages/react-calendar/package.json +++ b/packages/react-calendar/package.json @@ -25,10 +25,10 @@ "build-js-cjs-package": "echo '{\n \"type\": \"commonjs\"\n}' > dist/cjs/package.json", "clean": "rimraf dist", "copy-styles": "cpy 'src/**/*.css' dist", + "format": "prettier --check . --cache", "lint": "eslint . --ext .js,.jsx,.ts,.tsx", "prepack": "yarn clean && yarn build", - "prettier": "prettier --check . --cache", - "test": "yarn lint && yarn tsc && yarn prettier && yarn unit", + "test": "yarn lint && yarn tsc && yarn format && yarn unit", "tsc": "tsc", "unit": "vitest", "watch": "yarn build-js-esm --watch & yarn build-js-cjs --watch & nodemon --watch src --ext css --exec \"yarn copy-styles\"" diff --git a/test/package.json b/test/package.json index 2791bd90..f86f6660 100644 --- a/test/package.json +++ b/test/package.json @@ -7,10 +7,10 @@ "scripts": { "build": "vite build", "dev": "vite", - "preview": "vite preview", + "formatter": "prettier --check . --cache", "lint": "eslint . --ext .js,.jsx,.ts,.tsx", - "prettier": "prettier --check . --cache", - "test": "yarn lint && yarn tsc && yarn prettier", + "preview": "vite preview", + "test": "yarn lint && yarn tsc && yarn formatter", "tsc": "tsc" }, "author": {