From 819a5fdde48da14679532cdab31b480fc45b0586 Mon Sep 17 00:00:00 2001 From: "Daniel D. Beck" Date: Wed, 25 Mar 2026 15:40:59 +0100 Subject: [PATCH 1/2] Use file extensions in web-features package --- packages/web-features/index.ts | 2 +- packages/web-features/tsconfig.json | 4 ++-- types.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/web-features/index.ts b/packages/web-features/index.ts index 54ae8ee16c0..8196ca6ceba 100644 --- a/packages/web-features/index.ts +++ b/packages/web-features/index.ts @@ -1,7 +1,7 @@ import { readFileSync } from "node:fs"; import { fileURLToPath } from "node:url"; -import { WebFeaturesData } from "./types"; +import { WebFeaturesData } from "./types.js"; const jsonPath = fileURLToPath(new URL("./data.json", import.meta.url)); const { browsers, features, groups, snapshots } = JSON.parse( diff --git a/packages/web-features/tsconfig.json b/packages/web-features/tsconfig.json index e483fa95943..2fce7bb7a0f 100644 --- a/packages/web-features/tsconfig.json +++ b/packages/web-features/tsconfig.json @@ -1,8 +1,8 @@ { "compilerOptions": { "target": "ES2016", - "module": "ESNext", - "moduleResolution": "Bundler", + "module": "nodenext", + "moduleResolution": "nodenext", "typeRoots": ["./node_modules/@types"], "declaration": true } diff --git a/types.ts b/types.ts index 24256c80498..14d44ef4e0f 100644 --- a/types.ts +++ b/types.ts @@ -18,7 +18,7 @@ import type { Release, SnapshotData, Support, -} from "./types.quicktype"; +} from "./types.quicktype.js"; // Passthrough types export type { From ee87de934af712a029571446cb30f8d5541b19a4 Mon Sep 17 00:00:00 2001 From: "Daniel D. Beck" Date: Wed, 25 Mar 2026 15:41:38 +0100 Subject: [PATCH 2/2] Update eslint config to ignore built JS files --- eslint.config.js | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/eslint.config.js b/eslint.config.js index 62c7785e02d..bbda4075eb5 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -1,21 +1,26 @@ import newWithError from "eslint-plugin-new-with-error"; +import { defineConfig, globalIgnores } from "eslint/config"; import tseslint from "typescript-eslint"; -export default tseslint.config(tseslint.configs.base, { - plugins: { newWithError }, - rules: { - "@typescript-eslint/no-unused-vars": [ - "error", - { - caughtErrors: "none", - }, - ], - "newWithError/new-with-error": "error", - "no-duplicate-imports": "error", - "no-throw-literal": "error", +export default defineConfig( + tseslint.configs.base, + { + plugins: { newWithError }, + rules: { + "@typescript-eslint/no-unused-vars": [ + "error", + { + caughtErrors: "none", + }, + ], + "newWithError/new-with-error": "error", + "no-duplicate-imports": "error", + "no-throw-literal": "error", + }, + files: ["**/*.ts"], }, - files: ["**/*.ts"], -}); + globalIgnores(["packages/web-features/**/*.js"]), +); // TODO: do linting more comprehensively, something like: // import eslint from "@eslint/js";