git commit 提交代码报错

husky > pre-commit (node v16.15.1)
Stashing changes... [started]
Stashing changes... [skipped]
→ No partially staged files found...
Running tasks... [started]
Running tasks for src/**/*.{js,vue} [started]
npm run lint [started]
npm run lint [failed]

Running tasks for src/**/*.{js,vue} [failed]

Running tasks... [failed]

× npm run lint found some errors. Please fix them and try committing again.

> cash-client@1.0.0 lint
> eslint --fix --ext .js,.vue src "C:/Users/song1/Desktop/web_manage/src/api/store.js" "C:/Users/song1/Desktop/web_manage/src/components/ProTable/index.vue" "C:/Users/song1/Desktop/web_manage/src/views/store/index.vue"

npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.

Oops! Something went wrong! :(

ESLint: 6.8.0.

You are linting "src", but all of the files matching the glob pattern "src" are ignored.

If you don't want to lint these files, remove the pattern "src" from the list of arguments passed to ESLint.

If you do want to lint these files, try the following solutions:

* Check your .eslintignore file, or the eslintIgnore property in package.json, to ensure that the files are not configured to be ignored.
* Explicitly list the files from this glob that you'd like to lint on the command-line, rather than providing a glob as an argument.
husky > pre-commit hook failed (add --no-verify to bypass)
 

只需要在commit 后面追加 --no-verify  就可以解决

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值