Skip to content

Commit

Permalink
Rename prettier command to format
Browse files Browse the repository at this point in the history
  • Loading branch information
wojtekmaj committed Apr 15, 2024
1 parent a8aacc4 commit 50fa88c
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Expand Up @@ -80,8 +80,8 @@ jobs:
- name: Run type checking
run: yarn tsc

prettier:
name: Prettier
format:
name: Formatting
runs-on: ubuntu-latest

steps:
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .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"
}
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -10,9 +10,9 @@
"scripts": {
"build": "yarn workspace react-pdf build",
"dev": "yarn workspace react-pdf 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"
Expand Down
4 changes: 2 additions & 2 deletions packages/react-pdf/package.json
Expand Up @@ -36,10 +36,10 @@
"build-js-cjs-package": "echo '{\n \"type\": \"commonjs\"\n}' > dist/cjs/package.json",
"clean": "rimraf dist",
"copy-styles": "cpy 'src/**/*.css' dist/esm && cpy 'src/**/*.css' dist/cjs",
"formatter": "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 formatter && 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\""
Expand Down
6 changes: 3 additions & 3 deletions test/package.json
Expand Up @@ -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": {
Expand Down

0 comments on commit 50fa88c

Please sign in to comment.