diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index cdbf5070043..07a1d5b98fb 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -43,16 +43,16 @@ jobs: if: ${{ !cancelled() }} # Validate types with tsc - https://www.typescriptlang.org/docs/handbook/compiler-options.html#using-the-cli - - name: Run Typecheck + - name: Run Typecheck (TS files) run: pnpm typecheck id: typecheck if: ${{ !cancelled() }} - # Run tsc again on the scripts folder. - # Required in order to use separate rules for script js files and regular ts files - - name: Run Typecheck (scripts) - run: pnpm typecheck:scripts - id: typecheck-scripts + # Run tsc again on all JS files. + # Required in order to use separate rules for different types of files + - name: Run Typecheck (JS files) + run: pnpm typecheck:js + id: typecheck-js if: ${{ !cancelled() }} - name: Check for REUSE compliance diff --git a/scripts/jsconfig.json b/jsconfig.json similarity index 91% rename from scripts/jsconfig.json rename to jsconfig.json index 4fd508be8f7..c87aba36dea 100644 --- a/scripts/jsconfig.json +++ b/jsconfig.json @@ -6,13 +6,14 @@ */ { "include": ["**/*.js"], + "exclude": ["assets", "dist", "node_modules", "typedoc"], "compilerOptions": { - "allowJs": true, - "checkJs": true, - "rootDir": ".", "target": "esnext", "module": "nodenext", "moduleResolution": "nodenext", + "allowJs": true, + "checkJs": true, + "rootDir": ".", "erasableSyntaxOnly": true, "strict": true, "noEmit": true, diff --git a/package.json b/package.json index 348fe750905..614da8ba071 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "eggMoves:parse": "node scripts/parse-egg-moves/main.js", "scrape-trainers": "node scripts/scrape-trainer-names/main.js", "typecheck": "tsc --noEmit", - "typecheck:scripts": "tsc -p scripts/jsconfig.json", + "typecheck:js": "tsc -p jsconfig.json", "biome": "biome check --write --changed --no-errors-on-unmatched --diagnostic-level=error", "biome:staged": "biome check --write --staged --no-errors-on-unmatched --diagnostic-level=error", "biome:all": "biome check --write --no-errors-on-unmatched --diagnostic-level=error", diff --git a/typedoc-plugins/typedoc-plugin-rename-svg.js b/typedoc-plugins/typedoc-plugin-rename-svg.js index e940320313c..e4e7a1311d6 100644 --- a/typedoc-plugins/typedoc-plugin-rename-svg.js +++ b/typedoc-plugins/typedoc-plugin-rename-svg.js @@ -4,16 +4,15 @@ * * SPDX-License-Identifier: AGPL-3.0-only */ -// @ts-check - -import { PageKind, Renderer } from "typedoc"; /** - * @module * Typedoc plugin to run post-processing on the `index.html` file and replace the coverage SVG * for Beta with the newly generated file for the current branch. + * @module */ +import { PageKind, Renderer } from "typedoc"; + /** * @param {import('typedoc').Application} app */