feat: fix oxlint error for oxlint upgrade (#7756)

1. remove unknown rule out of oxlint
2. add the corresponding back to eslint-config
3. fixed the eslint error for package.json
This commit is contained in:
HaroldZhangCode91
2026-04-01 19:28:57 +08:00
committed by GitHub
parent 80d6e2255f
commit b8b4308e1c
3 changed files with 30 additions and 29 deletions

View File

@@ -104,6 +104,8 @@ export async function javascript(): Promise<Linter.Config[]> {
'keyword-spacing': 'off',
'no-control-regex': 'error',
'no-empty-function': 'off',
'no-octal': 'error',
'no-octal-escape': 'error',
'no-restricted-properties': [
'error',
{
@@ -136,8 +138,32 @@ export async function javascript(): Promise<Linter.Config[]> {
'TSEnumDeclaration[const=true]',
'TSExportAssignment',
],
'no-undef-init': 'error',
'no-undef': 'off',
'no-unreachable-loop': 'error',
'object-shorthand': [
'error',
'always',
{
avoidQuotes: true,
ignoreConstructors: false,
},
],
'one-var': ['error', { initialized: 'never' }],
'prefer-arrow-callback': [
'error',
{
allowNamedFunctions: false,
allowUnboundThis: true,
},
],
'prefer-regex-literals': [
'error',
{
disallowRedundantWrapping: true,
},
],
'spaced-comment': 'error',
'space-before-function-paren': 'off',
'unused-imports/no-unused-imports': 'error',