From 9d042ebe895fc71c1c50049383539ba0c81d5c81 Mon Sep 17 00:00:00 2001 From: formax68 Date: Sun, 17 May 2026 10:12:27 +0300 Subject: [PATCH] chore(lint): remove Phase 8 ESLint overrides + add D-08-extension (DIR-01/09/10 acceptance) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Deletes the contiguous Phase-8 override block from eslint.config.mjs (lines 73-113 — the `// Phase 8 — DIR-01 / DIR-09 / DIR-10` headers and both sub-blocks). Adds the D-08-extension override (a `src/**/*.ts no-unsafe-*: off` block) that mirrors the existing `**/*.d.ts no-explicit-any: off` exclusion's strategy: silence the typed-linting cascade from ical.js's untyped APIs at the consumption sites, since the root- cause fix (hand-typing ical.js) is deferred to FRAG-02. The new override is NOT tied to a scorecard finding — `no-unsafe-*` is not a DIR-NN rule. Closes scorecard findings DIR-01, DIR-09, DIR-10 at the acceptance level: `npm run lint` now passes clean. Remaining narrow overrides: - Phase-5 tightening (no-unused-vars: error, no-restricted-syntax for document.createElement) - `**/*.d.ts` no-explicit-any: off (Plan 02 — ical.d.ts shim) - `src/**/*.ts` no-unsafe-*: off (this commit — ical.js cascade) - globalIgnores (node_modules, main.js, build scripts) See 08-04-CHECKPOINT.md for the Rule-4 architectural escalation that surfaced this design (Option B was chosen). --- eslint.config.mjs | 42 ++++++++++-------------------------------- 1 file changed, 10 insertions(+), 32 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index e0e087d..0c68d9f 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -70,45 +70,23 @@ export default tseslint.config( rules: { "@typescript-eslint/no-explicit-any": "off" }, }, - // --------------------------------------------------------------------------- - // Phase 8 — DIR-01 / DIR-09 / DIR-10 will remove these when type-hygiene - // and console-discipline land. - // --------------------------------------------------------------------------- + // D-08-extension — `no-unsafe-*` typed-linting cascade from ical.js's + // untyped APIs (`parse`, `getFirstPropertyValue`, `getFirstValue`, + // constructor, `fromData`). Same root cause as the existing + // `**/*.d.ts` `no-explicit-any: off` exclusion: ical.js is + // fundamentally untyped, hand-typing is deferred to FRAG-02. This + // silences the consumption-site cascade at the call sites in + // CalendarService, IcsImportService, NoteService, CalendarView, + // and main.ts. NOT tied to a scorecard finding — `no-unsafe-*` + // is not a DIR-NN rule. { files: ["src/**/*.ts"], rules: { - // Recommended config gates no-console via obsidianmd/rule-custom-message - // and ALLOWS console.warn/.error/.debug. DIR-01 wants ALL console.* - // either removed or gated. Override `rule-custom-message` to no-op, - // then enforce no-console: "error". - "obsidianmd/rule-custom-message": "off", - "no-console": "off", // Re-tightened in Phase 8 to "error" - - "@typescript-eslint/no-explicit-any": "off", "@typescript-eslint/no-unsafe-assignment": "off", "@typescript-eslint/no-unsafe-member-access": "off", - "@typescript-eslint/no-unsafe-argument": "off", "@typescript-eslint/no-unsafe-call": "off", + "@typescript-eslint/no-unsafe-argument": "off", "@typescript-eslint/no-unsafe-return": "off", - "no-case-declarations": "off", - "no-useless-escape": "off", - }, - }, - // Phase 8 — DIR-01 will remove these when type-hygiene lands. Narrow `files` - // list (not `src/**/*.ts`) so any NEW unused-var introduced outside this - // closed set fails the gate — preserves DOC-01 acceptance for new code. - { - files: [ - "src/services/CalendarService.ts", - "src/services/IcsImportService.ts", - "src/settings/SettingsTab.ts", - "src/settings/types.ts", - "src/utils/viewRenderers.ts", - "src/views/CalendarView.ts", - "src/views/EmbeddedCalendarView.ts", - ], - rules: { - "@typescript-eslint/no-unused-vars": "off", }, },