build: add frontend TypeScript toolchain

This commit is contained in:
sjg
2026-08-01 11:52:47 +02:00
parent 860760ecfc
commit 888f793eb8
56 changed files with 43175 additions and 23 deletions
@@ -0,0 +1,42 @@
// SPDX-FileCopyrightText: 2026 Stan Grams <sjg@haxx.space>
//
// SPDX-License-Identifier: GPL-2.0-or-later
import eslint from "@eslint/js";
import globals from "globals";
import tseslint from "typescript-eslint";
export default tseslint.config(
{
ignores: [
"../assets/web/generated/**",
// Removed file-by-file as the legacy sources are converted to TypeScript.
"src/**/*.js",
],
},
{
files: ["**/*.mjs"],
...eslint.configs.recommended,
languageOptions: {
globals: globals.node,
},
},
...tseslint.configs.strictTypeChecked.map((config) => ({
...config,
files: ["src/**/*.ts", "tests/**/*.ts"],
})),
{
files: ["src/**/*.ts", "tests/**/*.ts"],
languageOptions: {
globals: globals.browser,
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname,
},
},
rules: {
"no-undef": "off",
"@typescript-eslint/no-explicit-any": "error",
},
},
);