diff --git a/eslint.config.mjs b/eslint.config.mjs index 720736fc0a70c94429d5f3e5c31129492872e05a..286951d91de421c618fa9e8c9f14b02a8bc69a2f 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -3,13 +3,23 @@ import withNuxt from './.nuxt/eslint.config.mjs' export default withNuxt({ files: ['**/*.vue', '**/*.js'], + rules: { - 'indent': [2, 2], - 'vue/html-indent': ['off', 'tab', { }], + 'semi': [0], + 'indent': ['error', 2], + 'vue/html-indent': ['off', 2, {}], 'no-empty': ['error', { 'allowEmptyCatch': true }], 'vue/no-v-html': 'off', 'no-useless-escape': 'error', 'vue/no-multiple-template-root': 'off', - 'vue/multi-word-component-names': 0 + 'vue/multi-word-component-names': 0, + 'array-bracket-spacing': [2, 'always'], + 'quotes': [2, 'single'], + // 引号类型 `` "" '' + 'object-curly-spacing': ['error', 'always'], + // 关键字后面是否要空一格 + 'keyword-spacing': [2, { 'before': true, 'after': true }], + // 强制最后一行空行 + 'no-multiple-empty-lines': ['error', { 'max': 2,'maxEOF': 1 }] } })