Skip to content

Commit b0fa41c

Browse files
committed
Run formatting in check mode in CI environment
1 parent ace7d39 commit b0fa41c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"build:types": "dts-bundle-generator -o dist/types.d.ts src/index.ts",
1313
"type-check": "tsc --noEmit",
1414
"lint": "eslint",
15-
"format": "prettier --write '**/*.{ts,tsx,js,jsx,json,yml}'",
15+
"format": "prettier $([ $CI ] && echo '--check' || echo '--write') '**/*.{js,jsx,ts,tsx,json,yml}'",
1616
"spec": "vitest run",
1717
"coverage": "vitest run --coverage",
1818
"verify": "npm run lint && npm run type-check && npm run format",

0 commit comments

Comments
 (0)