1.0.0 • Published 3 years ago

acc-eslint-config-vue v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

npm install

#eslintrc.js extends: "plugin:vue/essential", rules: {}, parserOptions: { parser: "babel-eslint" }

#注意事项(如果您使用VSCode编译器,可能会有冲突),注意以下设置 brace_style,格式风格,详见官方说明(为避免和eslint默认检查冲突,建议此属性设置为 none,preserve-inline) indent_size,缩进长度(为避免和eslint默认检查冲突,建议此属性设置为 2) jslint_happy:true,若你要搭配jslint使用,请开启此选项 unformatted:"a","pre",这里放不需要格式化的标签类型。注意 template 也是默认不格式化的,.vue 的template 标签如果需要格式化请在 .jsbeautifyrc 重新定义不带 template 的声明属性

#建议(如果您使用VSCode) 建议使用ESLint插件,并设置配置文件(个人建议关闭其他美化代码插件,避免冲突): "eslint.enable": true, "eslint.autoFixOnSave": true, "eslint.validate": "javascript", "javascriptreact", { "language": "html", "autoFix": true }, { "language": "vue", "autoFix": true } , 以上设置会为您保存代码时,进行格式化代码,主要格式化空格和换行类型的美化。

1.0.0

3 years ago