update: eslint 配置补充

This commit is contained in:
binaryify 2024-01-13 15:07:38 +08:00
parent 32531f1331
commit daa377ffb9

View File

@ -1,5 +1,6 @@
module.exports = { module.exports = {
root: true, root: true,
ignorePatterns: ['public/'], ignorePatterns: ['public/'],
parserOptions: { parserOptions: {
parser: 'babel-eslint', parser: 'babel-eslint',
@ -14,6 +15,12 @@ module.exports = {
}, },
rules: { rules: {
'prettier/prettier': [
'error',
{
endOfLine: 'auto',
},
],
indent: ['error', 2, { SwitchCase: 1 }], indent: ['error', 2, { SwitchCase: 1 }],
'space-infix-ops': ['error', { int32Hint: false }], 'space-infix-ops': ['error', { int32Hint: false }],
'key-spacing': [ 'key-spacing': [