You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

42 lines
1.3 KiB

module.exports = {
env: {
browser: true,
es2021: true,
node: true
},
extends: [
'plugin:vue/essential',
'standard',
'plugin:vue/vue3-recommended'
],
parserOptions: {
ecmaVersion: 'latest',
parser: '@typescript-eslint/parser',
sourceType: 'module'
// ecmaFeatures: {
// modules: true
// }
// requireConfigFile: false
},
plugins: [
'vue',
'@typescript-eslint'
],
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'vue/multi-word-component-names': 'off', // 关闭命名规则
semi: [2, 'never'], // 禁止尾部使用分号“ ; ”
'no-var': 'error', // 禁止使用 var
indent: ['error', 2], // 缩进2格
'no-mixed-spaces-and-tabs': 'error', // 不能空格与tab混用
quotes: [2, 'single'], // 使用单引号
'vue/html-closing-bracket-newline': 'off', // 不强制换行
'vue/singleline-html-element-content-newline': 'off', // 不强制换行
'vue/max-attributes-per-line': ['error', {
singleline: { max: 5 },
multiline: { max: 5 }
}] // vue template模板元素第一行最多5个属性
// 其它的规则可以去eslint查看,根据自己需要进行添加
}
}