更新 eslint 配置
This commit is contained in:
@@ -13,25 +13,15 @@ const compat = new FlatCompat({
|
|||||||
// noinspection SpellCheckingInspection
|
// noinspection SpellCheckingInspection
|
||||||
const eslintConfig = [
|
const eslintConfig = [
|
||||||
...compat.extends('next/core-web-vitals', 'next/typescript'),
|
...compat.extends('next/core-web-vitals', 'next/typescript'),
|
||||||
|
stylistic.configs.recommended,
|
||||||
{
|
{
|
||||||
plugins: {
|
|
||||||
'@stylistic': stylistic,
|
|
||||||
},
|
|
||||||
rules: {
|
rules: {
|
||||||
'@stylistic/semi': ['error', 'never'],
|
'@stylistic/object-curly-spacing': ['error', 'never'],
|
||||||
'@stylistic/indent': ['error', 2],
|
'@stylistic/jsx-tag-spacing': ['error', {
|
||||||
|
beforeSelfClosing: 'never',
|
||||||
|
}],
|
||||||
'@typescript-eslint/no-empty-object-type': 'off',
|
'@typescript-eslint/no-empty-object-type': 'off',
|
||||||
'@typescript-eslint/no-unused-vars': 'off',
|
'@typescript-eslint/no-unused-vars': 'off',
|
||||||
'@stylistic/member-delimiter-style': ['error', {
|
|
||||||
multiline: {
|
|
||||||
delimiter: 'none',
|
|
||||||
requireLast: true,
|
|
||||||
},
|
|
||||||
singleline: {
|
|
||||||
delimiter: 'comma',
|
|
||||||
requireLast: false,
|
|
||||||
},
|
|
||||||
}],
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user