通过eslint进行前端代码规范检测
如果目标./目录下没有eslint可以进行检查的文件:
eslint ./ --config=.eslintrc.json
报
Oops! Something went wrong! :(
ESLint: 8.21.0
No files matching the pattern "./" were found.
Please check for typing mistakes in the pattern.
此时如果需要忽略这个错误,则后面加上 --no-error-on-unmatched-pattern即可
eslint ./ --config=.eslintrc.json --no-error-on-unmatched-pattern
或者需要保证目标./路径下面存在eslint可以检查到的文件.js&.ts等