diff --git a/.eslintrc.js b/.eslintrc.js index fc3bc36a5..6e541c3c2 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -23,7 +23,7 @@ module.exports = { ], 'prefer-arrow-callback': 'warn', // 建议使用箭头函数 'prefer-const': 'error', // 强制使用 const 定义常量 - 'indent': ['error', 2], // 缩进 2 个空格 + 'indent': ['error', 2, { SwitchCase: 1 }], // 缩进 2 个空格 SwitchCase缩进 // '@stylistic/js/indent': ['error', 2], // 缩进 2 个空格 'no-mixed-spaces-and-tabs': 'error', // 禁止混用空格和 tab缩进 'quotes': ['error', 'single'], // 强制使用单引号