|
@@ -6,15 +6,15 @@ module.exports = {
|
|
|
es2021: true,
|
|
|
node: true,
|
|
|
},
|
|
|
- parser: "vue-eslint-parser",
|
|
|
+ parser: 'vue-eslint-parser',
|
|
|
extends: [
|
|
|
- "plugin:vue/vue3-recommended",
|
|
|
+ 'plugin:vue/vue3-recommended',
|
|
|
'eslint:recommended',
|
|
|
- '@unocss'
|
|
|
+ '@unocss',
|
|
|
],
|
|
|
parserOptions: {
|
|
|
- ecmaVersion: "latest",
|
|
|
- sourceType: "module",
|
|
|
+ ecmaVersion: 'latest',
|
|
|
+ sourceType: 'module',
|
|
|
},
|
|
|
globals: {},
|
|
|
plugins: ['vue'],
|
|
@@ -44,7 +44,7 @@ module.exports = {
|
|
|
'no-return-assign': 'off',
|
|
|
'operator-linebreak': ['error', 'before'],
|
|
|
'max-statements-per-line': ['error', {
|
|
|
- max: 1
|
|
|
+ max: 1,
|
|
|
}],
|
|
|
'vue/singleline-html-element-content-newline': 'off',
|
|
|
|
|
@@ -67,7 +67,7 @@ module.exports = {
|
|
|
'indent': 'off',
|
|
|
'no-invalid-this': 'off',
|
|
|
'no-redeclare': 'off',
|
|
|
- "no-use-before-define": 'off',
|
|
|
+ 'no-use-before-define': 'off',
|
|
|
'brace-style': 'error',
|
|
|
'comma-dangle': ['error', 'always-multiline'],
|
|
|
'object-curly-spacing': ['error', 'always'],
|
|
@@ -83,21 +83,21 @@ module.exports = {
|
|
|
'space-infix-ops': 'error',
|
|
|
'keyword-spacing': ['error', {
|
|
|
before: true,
|
|
|
- after: true
|
|
|
+ after: true,
|
|
|
}],
|
|
|
'comma-spacing': ['error', {
|
|
|
before: false,
|
|
|
- after: true
|
|
|
+ after: true,
|
|
|
}],
|
|
|
'no-extra-parens': ['error', 'functions'],
|
|
|
'no-dupe-class-members': 'error',
|
|
|
'no-loss-of-precision': 'error',
|
|
|
'lines-between-class-members': ['error', 'always', {
|
|
|
- exceptAfterSingleLine: true
|
|
|
+ exceptAfterSingleLine: true,
|
|
|
}],
|
|
|
|
|
|
// vue
|
|
|
- "vue/html-indent": ["error", 4],
|
|
|
+ 'vue/html-indent': ['error', 4],
|
|
|
'vue/max-attributes-per-line': 'off',
|
|
|
'vue/no-v-html': 'off',
|
|
|
'vue/require-prop-types': 'off',
|
|
@@ -136,31 +136,31 @@ module.exports = {
|
|
|
'vue/array-bracket-spacing': ['error', 'never'],
|
|
|
'vue/arrow-spacing': ['error', {
|
|
|
before: true,
|
|
|
- after: true
|
|
|
+ after: true,
|
|
|
}],
|
|
|
'vue/block-spacing': ['error', 'always'],
|
|
|
'vue/brace-style': ['error', 'stroustrup', {
|
|
|
- allowSingleLine: true
|
|
|
+ allowSingleLine: true,
|
|
|
}],
|
|
|
'vue/comma-dangle': ['error', 'always-multiline'],
|
|
|
'vue/comma-spacing': ['error', {
|
|
|
before: false,
|
|
|
- after: true
|
|
|
+ after: true,
|
|
|
}],
|
|
|
'vue/comma-style': ['error', 'last'],
|
|
|
'vue/dot-location': ['error', 'property'],
|
|
|
'vue/dot-notation': ['error', {
|
|
|
- allowKeywords: true
|
|
|
+ allowKeywords: true,
|
|
|
}],
|
|
|
'vue/eqeqeq': ['error', 'smart'],
|
|
|
// 'vue/func-call-spacing': ['off', 'never'],
|
|
|
'vue/key-spacing': ['error', {
|
|
|
beforeColon: false,
|
|
|
- afterColon: true
|
|
|
+ afterColon: true,
|
|
|
}],
|
|
|
'vue/keyword-spacing': ['error', {
|
|
|
before: true,
|
|
|
- after: true
|
|
|
+ after: true,
|
|
|
}],
|
|
|
'vue/no-constant-condition': 'warn',
|
|
|
'vue/no-empty-pattern': 'error',
|
|
@@ -171,11 +171,11 @@ module.exports = {
|
|
|
'vue/no-sparse-arrays': 'error',
|
|
|
'vue/object-curly-newline': ['error', {
|
|
|
multiline: true,
|
|
|
- consistent: true
|
|
|
+ consistent: true,
|
|
|
}],
|
|
|
'vue/object-curly-spacing': ['error', 'always'],
|
|
|
'vue/object-property-newline': ['error', {
|
|
|
- allowMultiplePropertiesPerLine: true
|
|
|
+ allowMultiplePropertiesPerLine: true,
|
|
|
}],
|
|
|
'vue/object-shorthand': ['error', 'always', {
|
|
|
ignoreConstructors: false,
|
|
@@ -188,8 +188,8 @@ module.exports = {
|
|
|
'vue/space-infix-ops': 'error',
|
|
|
'vue/space-unary-ops': ['error', {
|
|
|
words: true,
|
|
|
- nonwords: false
|
|
|
+ nonwords: false,
|
|
|
}],
|
|
|
'vue/template-curly-spacing': 'error',
|
|
|
},
|
|
|
-};
|
|
|
+}
|