From 1050f8cc202bc9cd0f172cc6df0d378f82292056 Mon Sep 17 00:00:00 2001 From: Satoshi Qazi Muhammed Date: Wed, 7 Oct 2026 08:09:35 +0400 Subject: [PATCH] Type-check JavaScript explicitly in the shared tsconfig @tsconfig/strictest dropped checkJs in 2.0.8, so every .js and .mjs file fell out of the program: lint could not parse them with type information, and JavaScript in every repository built with this config went unchecked. allowJs and checkJs are now set here, independent of the base. Two @ts-expect-error lines in config/eslint.js no longer had an error to expect: eslint-plugin-import 2.32 and eslint-plugin-react 7.37 ship types. Co-Authored-By: Claude Opus 5.5 (1M context) --- packages/dev/config/eslint.js | 2 -- packages/dev/config/tsconfig.json | 8 ++++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/dev/config/eslint.js b/packages/dev/config/eslint.js index 646abcf..f881d36 100644 --- a/packages/dev/config/eslint.js +++ b/packages/dev/config/eslint.js @@ -10,7 +10,6 @@ import standardConfig from 'eslint-config-standard'; import deprecationPlugin from 'eslint-plugin-deprecation'; // @ts-expect-error No definition for this one import headerPlugin from 'eslint-plugin-header'; -// @ts-expect-error No definition for this one import importPlugin from 'eslint-plugin-import'; // @ts-expect-error No definition for this one import importNewlinesPlugin from 'eslint-plugin-import-newlines'; @@ -20,7 +19,6 @@ import jestPlugin from 'eslint-plugin-jest'; import nPlugin from 'eslint-plugin-n'; // @ts-expect-error No definition for this one import promisePlugin from 'eslint-plugin-promise'; -// @ts-expect-error No definition for this one import reactPlugin from 'eslint-plugin-react'; // @ts-expect-error No definition for this one import reactHooksPlugin from 'eslint-plugin-react-hooks'; diff --git a/packages/dev/config/tsconfig.json b/packages/dev/config/tsconfig.json index e6f320c..5ff939e 100644 --- a/packages/dev/config/tsconfig.json +++ b/packages/dev/config/tsconfig.json @@ -5,6 +5,14 @@ */ "extends": "@tsconfig/strictest/tsconfig.json", "compilerOptions": { + /** + * JavaScript sources are type-checked like the rest. The base set this + * until @tsconfig/strictest 2.0.8 dropped checkJs, which left every .js and + * .mjs file outside the program: lint could not parse them with type info. + */ + "allowJs": true, + "checkJs": true, + /** * Aligns with packages/dev/scripts/pezkuwi-dev-build-ts & packages/dev-ts/src/loader * (target here is specifically tied to the minimum supported Node version)