Dor*_*ian 6 lint husky lint-staged
例如,我在 .rb 和 .js 文件上匹配了它。
例如**/*.{js,rb}
例如,还想匹配Gemfile。Rakefile
解决方案是递归使用{},例如
"lint-staged": {
"{Gemfile,Rakefile,**/*.{js,rb,rake,ru}}": [
"./node_modules/prettier/bin-prettier.js --write"
],
"**/*.js": [
"node_modules/eslint/bin/eslint.js"
],
"{Gemfile,Rakefile,**/*.{rb,rake,ru}}": [
"bundle exec rubocop -a"
]
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2259 次 |
| 最近记录: |