Skip to content

Commit

Permalink
fix: 修复 lint-staged 中 prettier 以 json 格式美化代码的无效命令问题
Browse files Browse the repository at this point in the history
--write 与 --parser 应存在空格
  • Loading branch information
huishanyi committed Mar 6, 2024
1 parent 97a1cd4 commit 7b2eae1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .husky/lintstagedrc.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {
'*.{js,jsx,ts,tsx}': ['eslint --fix', 'prettier --write'],
'{!(package)*.json,*.code-snippets,.!(browserslist)*rc}': ['prettier --write--parser json'],
'{!(package)*.json,*.code-snippets,.!(browserslist)*rc}': ['prettier --parser json --write'],
'package.json': ['prettier --write'],
'*.vue': ['prettier --write', 'stylelint --fix'],
'*.{scss,less,styl,css,html}': ['stylelint --fix', 'prettier --write'],
Expand Down

0 comments on commit 7b2eae1

Please sign in to comment.