sách gpt4 ai đã đi

lint - 如何为 lint-staged 设置多个模式?

In lại 作者:行者123 更新时间:2023-12-05 02:43:32 27 4
mua khóa gpt4 Nike

例如,我让它在 .rb 和 .js 文件上匹配。

Ví dụ**/*.{js,rb}

并且还想在 GemfileRakefile 上进行匹配。

1 Câu trả lời

解决方案是递归地使用 {},例如

  "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"
]
}

关于lint - 如何为 lint-staged 设置多个模式?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66878837/

27 4 0
行者123
Hồ sơ cá nhân

Tôi là một lập trình viên xuất sắc, rất giỏi!

Nhận phiếu giảm giá Didi Taxi miễn phí
Mã giảm giá Didi Taxi
Giấy chứng nhận ICP Bắc Kinh số 000000
Hợp tác quảng cáo: 1813099741@qq.com 6ren.com