我的项目结构如下:
project
- .husky
- src
-- all files
- package.json
这是我
lint-staged
来自package.json
"lint-staged": "^12.1.7",
.
.
.
"lint-staged": {
"*.{js,ts,tsx}": [
"npm run prettier",
"npm run lint:fix"
]
},
有人可以告诉我我有什么问题吗
yarn lint-staged
启动此命令后他总是返回给我:
→ No staged files match any configured task.
感谢您的帮助!
PS。我正在从预推哈士奇脚本运行此命令
跑步前
git add .
你跑步过吗yarn lint-staged
?
这里
"*/*.{js,ts,tsx}"
应该是 "**/*.{js,ts,tsx}"
并有 2 颗星。因此,它将在您所有的存储库中查找