From 1ac1b535fc2f183c1d87c03f03205634c6ee0a2e Mon Sep 17 00:00:00 2001 From: DebugIsFalse <511418503@qq.com> Date: Tue, 11 Jun 2024 18:05:46 +0800 Subject: [PATCH] Update eslint.config.mjs --- eslint.config.mjs | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index 720736f..286951d 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 }] } }) -- GitLab