Skip to content

Commit 7663e9d

Browse files
authored
Merge pull request #45 from ugogo/chore/add-format-npm-script
chore: a format npm script
2 parents 0ea1362 + 2b89837 commit 7663e9d

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.github/workflows/lint.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,6 @@ jobs:
2121

2222
- name: Lint
2323
run: npm run lint
24+
25+
- name: Check formatting
26+
run: npm run format:check

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@
3636
"test:unit": "cross-env CI=1 react-scripts test --env=jsdom",
3737
"test:watch": "react-scripts test --env=jsdom",
3838
"release": "npm run test && npm run prepare && dotenv release-it",
39-
"lint": "eslint . --ext .js,.ts,.tsx"
39+
"lint": "eslint . --ext .js,.ts,.tsx",
40+
"format": "prettier --write {src,playground}",
41+
"format:check": "prettier --check {src,playground}/**/*.{ts,tsx}"
4042
},
4143
"peerDependencies": {
4244
"react": ">=16.0.0",

0 commit comments

Comments
 (0)