Skip to content

Commit 9299209

Browse files
committed
feat: automatically format the whole codebase with npm run format
1 parent 345bc79 commit 9299209

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

lint-staged.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module.exports = {
22
'*.{js,jsx,ts,tsx}': ['eslint --fix', 'eslint'],
33
'**/*.ts?(x)': () => 'npm run check-types',
4-
'*.json': ['prettier --write'],
4+
'*.{json,yaml}': ['prettier --write'],
55
};

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"build-prod": "run-s clean build export",
1111
"clean": "rimraf .next out",
1212
"lint": "next lint",
13+
"format": "next lint --fix && prettier '**/*.{json,yaml}' --write",
1314
"check-types": "tsc --noEmit --pretty && tsc --project cypress --noEmit --pretty",
1415
"test": "jest",
1516
"commit": "cz",

0 commit comments

Comments
 (0)