From f079b6997984cf37d591c6cd92ec5b4f7e11de9c Mon Sep 17 00:00:00 2001 From: xingyu4j Date: Fri, 26 Jun 2026 18:41:39 +0800 Subject: [PATCH] fix: no-non-null-assertion --- internal/lint-configs/oxlint-config/src/configs/typescript.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/lint-configs/oxlint-config/src/configs/typescript.ts b/internal/lint-configs/oxlint-config/src/configs/typescript.ts index adcbb7948..230d8e3d5 100644 --- a/internal/lint-configs/oxlint-config/src/configs/typescript.ts +++ b/internal/lint-configs/oxlint-config/src/configs/typescript.ts @@ -14,7 +14,8 @@ const typescript: OxlintConfig = { 'typescript/no-misused-new': 'error', 'typescript/no-non-null-asserted-nullish-coalescing': 'error', 'typescript/no-non-null-asserted-optional-chain': 'error', - 'typescript/no-non-null-assertion': 'error', + // 关闭,解决id!等类似报错 + 'typescript/no-non-null-assertion': 'off', 'typescript/no-require-imports': 'error', 'typescript/no-this-alias': 'error', 'typescript/no-unnecessary-type-constraint': 'error',