赞
踩
项目提交时,git提交一直报错
➜ my-project npm run dev
> bblee-app@1.0.0 dev /Users/bianlifeng/my-project
> webpack-dev-server --inline --progress --config build/webpack.dev.conf.js
95% emitting
WARNING Compiled with 1 warnings 5:00:12 PM
✘ http://eslint.org/docs/rules/indent Expected indentation of 0 spaces but found 2
src/components/Message.vue:46:1
export default {
^
✘ http://eslint.org/docs/rules/indent Expected indentation of 2 spaces but found 4
src/components/Message.vue:47:1
data() {
^
这是因为vue项目中带eslint校验,虽然这样写起来项目很规范,但是在提交代码时遇到报错,有时候觉得很烦。关闭git提交时校验
在项目根目录下新建文件.eslintignore
编辑文件
build/*.js
config/*.js
src/assets
src/
public
dist
提交成功,觉得有用的话,留个言再走!谢谢~
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。