-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vscode eslint .vue中提示 #82
Labels
Comments
.eslintrc.js // https://eslint.org/docs/user-guide/configuring
module.exports = {
root: true,
parserOptions: {
parser: 'babel-eslint'
},
env: {
browser: true,
es6: true
},
extends: [
// https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention
// consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules.
'plugin:vue/essential',
// https://github.com/standard/standard/blob/master/docs/RULES-en.md
// 'standard'
//使用eslint默认推荐
'eslint:recommended'
],
// required to lint *.vue files
plugins: [
'vue',
],
// add your custom rules here
rules: {
// allow async-await
'generator-star-spacing': 'off',
// allow debugger during development
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
"quotes":["error", "single"],
// "semi":[2,'always'],
"newline-per-chained-call":["warn",{"ignoreChainWithDepth": 3}],
"no-console": "off",
"default-case": "error",
"no-eval": "error",
"no-empty-function":"error",
"no-unused-vars": 2,
"no-multi-spaces": "warn",
"no-multi-str": "warn",
"no-self-compare": "warn",
"no-unmodified-loop-condition": "error", //禁用一成不变的循环条件
"no-delete-var": "off",
"no-use-before-define": ["error", {functions: false}],
"brace-style": "warn", //一致的大括号风格
"new-cap": "warn",
"no-multiple-empty-lines": ["warn",{max: 3}],
"no-unused-labels": "off",
"no-useless-escape": "off", //禁用不必要的转义
"space-infix-ops": ["warn", {"int32Hint": false}],
"comma-spacing": "warn",
"curly": "warn",
"operator-linebreak": "error",
"block-spacing": "warn",
"camelcase": "warn",
"comma-dangle": "off",
"comma-style": "warn",
"dot-location": "warn",
"key-spacing": "warn",
}
} |
vue-cli 3 config
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
npm install --save-dev eslint eslint-plugin-vue -g
.eslintrc.js
中The text was updated successfully, but these errors were encountered: