xys-monitor
Version:
A project named xys-monitor
64 lines (63 loc) • 2.16 kB
JavaScript
// https://eslint.org/docs/user-guide/configuring
module.exports = {
root: true,
parserOptions: {
parser: 'babel-eslint'
},
env: {
browser: 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',
'plugin:vue/strongly-recommended',
// https://github.com/standard/standard/blob/master/docs/RULES-en.md
'standard',
'plugin:muc/recommended'
],
// required to lint *.vue files
plugins: [
'vue',
'muc'
],
// 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',
'indent': ['error', 4, {
'SwitchCase': 1
}],
'spaced-comment': 'off',
"vue/max-attributes-per-line": ["error", {
"singleline": 99, //vue文件中单行允许的最大属性,根据习惯项目自行配置
"multiline": {
"max": 1,
"allowFirstLine": false
}
}],
"vue/html-indent": ["error", 4, {
"attribute": 1,
"baseIndent": 1,
"closeBracket": 0,
"alignAttributesVertically": true,
"ignores": []
}],
"vue/html-self-closing": ["error", {
"html": {
"void": "always",
"normal": "never",
"component": "always"
},
"svg": "always",
"math": "always"
}],
"vue/attribute-hyphenation": ["error", "never", {
"ignore": []
}],
"prefer-promise-reject-errors":"off",
"muc/promise-need-catch":"warn" // 自定义规则,promise调用链需要有catch来结尾,默认打开;如需关闭,把warn改成off
}
}