From 7aa8790f2ef77512ff87ec3105b6063ddc8bd919 Mon Sep 17 00:00:00 2001 From: luojiyin Date: Sat, 22 Aug 2026 13:58:54 +0800 Subject: [PATCH] refactor(types): enable noImplicitAny --- package.json | 1 + src/utils/format-lint-report.ts | 3 ++- tsconfig.json | 4 ---- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index b5f1349..21e18f7 100644 --- a/package.json +++ b/package.json @@ -65,6 +65,7 @@ "devDependencies": { "@types/jest": "^30.0.0", "@types/node": "^22.9.3", + "@types/text-table": "^0.2.5", "jest": "^30.0.0", "prettier": "^2.7.1", "ts-jest": "^29.4.7", diff --git a/src/utils/format-lint-report.ts b/src/utils/format-lint-report.ts index 0670b85..56b91aa 100644 --- a/src/utils/format-lint-report.ts +++ b/src/utils/format-lint-report.ts @@ -42,7 +42,8 @@ export const formatLintReport = (summary: LintSummary): string => { ]; }), { - align: ["", "r", "l"], + // text-table treats undefined like "" (default alignment). + align: [undefined, "r", "l"], stringLength(value) { return stripAnsi(value).length; }, diff --git a/tsconfig.json b/tsconfig.json index 168172b..5f90d72 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -11,10 +11,6 @@ // import of ../package.json makes the effective root the project // directory, which preserves the lib/src/** emit layout. "rootDir": "./", - // TS 6 flips the effective noImplicitAny default to true. Pinned to keep - // the upgrade diff behavior-preserving; see format-lint-report.ts for the - // known implicit-any sites awaiting cleanup. - "noImplicitAny": false, "types": [ "jest", "node"