init: 德州大陆架MES管理前端项目首次入库
This commit is contained in:
41
.eslintrc.js
Normal file
41
.eslintrc.js
Normal file
@@ -0,0 +1,41 @@
|
||||
module.exports = {
|
||||
root: true,
|
||||
parserOptions: {
|
||||
parser: '@babel/eslint-parser',
|
||||
ecmaVersion: 2020,
|
||||
sourceType: 'module'
|
||||
},
|
||||
env: {
|
||||
browser: true,
|
||||
node: true,
|
||||
es6: true
|
||||
},
|
||||
extends: [
|
||||
'plugin:vue/essential',
|
||||
'eslint:recommended',
|
||||
'plugin:prettier/recommended' // 必须放在最后,这样 Prettier 规则会覆盖 ESLint 的格式规则
|
||||
],
|
||||
rules: {
|
||||
// 将所有 Vue ESLint 规则降级为警告
|
||||
'vue/no-use-v-if-with-v-for': 'warn',
|
||||
'vue/return-in-computed-property': 'warn',
|
||||
'vue/html-closing-bracket-newline': 'off', // 交给 Prettier 处理
|
||||
'vue/attributes-order': 'warn',
|
||||
'vue/html-indent': 'off', // 交给 Prettier 处理
|
||||
'vue/no-spaces-around-equal-signs-in-attribute': 'off', // 交给 Prettier 处理
|
||||
'vue/no-lone-template': 'warn',
|
||||
'vue/component-tags-order': 'warn',
|
||||
'vue/no-template-shadow': 'warn',
|
||||
'vue/component-definition-name-casing': 'warn',
|
||||
'vue/mustache-interpolation-spacing': 'off', // 交给 Prettier 处理
|
||||
'vue/multi-word-component-names': 'warn',
|
||||
|
||||
// 其他常见规则也设为警告
|
||||
'no-console': 'off', // 开发调试需要,不限制 console
|
||||
'no-debugger': 'warn',
|
||||
'no-unused-vars': 'warn',
|
||||
|
||||
// Prettier 规则
|
||||
'prettier/prettier': ['warn', {}, { usePrettierrc: true }]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user