Skip to content

Commit 537787b

Browse files
committed
run prettier with lintstaged
1 parent ef8c764 commit 537787b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.lintstagedrc.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ const buildEslintCommand = (filenames) =>
55
.map((f) => path.relative(process.cwd(), f))
66
.join(" --file ")}`
77

8+
const formatCommand = "prettier --write"
9+
810
module.exports = {
9-
"*.{js,jsx,ts,tsx}": [buildEslintCommand],
11+
"*.{js,jsx,ts,tsx}": [buildEslintCommand, formatCommand],
1012
}

0 commit comments

Comments
 (0)