Skip to content

fix(ci): exclude workspace/** from tsconfig so _selftest lint stops scanning cloned rspack fixtures#51

Merged
fi3ework merged 1 commit into
mainfrom
fix/ci-rslint-exclude-workspace
May 25, 2026
Merged

fix(ci): exclude workspace/** from tsconfig so _selftest lint stops scanning cloned rspack fixtures#51
fi3ework merged 1 commit into
mainfrom
fix/ci-rslint-exclude-workspace

Conversation

@fi3ework
Copy link
Copy Markdown
Member

Summary

The ci.yml _selftest job runs pnpm lint after the build-rspack
composite action has already cloned upstream rspack into
workspace/rspack/. That tree contains intentionally invalid TypeScript
fixtures (e.g. tests/rspack-test/statsOutputCases/builtin-swc-loader-parse-error/index.ts
with export error;, and .../diagnosticsCases/factorize/mismatched-module-type/app.ts
with JSX in a .ts file) used to test rspack's compiler error reporting.

Since @rslint/core 0.5.2 aligned --type-check with tsc --noEmit
semantics (web-infra-dev/rslint#823),
rslint runs a TypeScript program over the project's tsconfig.json
include/exclude and surfaces the parser's TS1110 / TS1128
diagnostics. The repo's tsconfig had include: ["./**/*.ts"] with only
node_modules excluded, so the rspack fixture files were getting parsed
and breaking Lint on every recent ci.yml run — visible on #25, #49,
#50, and every renovate PR going back to 2026-05-20 (rspack (_selftest) FAILURE at step Lint).

ignores / files in rslint.config.ts only affect lint rules — they
do not gate the TypeScript program's file discovery (verified empirically
with 7 config variants, all still parse workspace/**). The fix has to
live in tsconfig.json.

-  "exclude": ["**/node_modules/**"],
+  "exclude": ["**/node_modules/**", "workspace/**"],

Test plan

  • Reproduced locally with a faked workspace/rspack/tests/rspack-test/statsOutputCases/builtin-swc-loader-parse-error/index.ts containing export error; — before the change pnpm lint errors with TypeScript(TS1128) — Declaration or statement expected.; with the change Found 0 errors and 0 warnings.
  • pnpm lint clean (rslint + prettier).
  • CI on this PR: rspack (_selftest) should reach the Run suite (selftest) step instead of failing at Lint.

Notes

This is independent of the @antfu/ni 0.21+ adaptation already merged in #25. The Lint scope problem has been present on ci.yml since the Lint step was added (3125e20, 2025-10-27) — the rslint 0.5.1→0.5.3 bump in #25 did not introduce it (verified by reproducing the same TS1110/TS1128 errors on 0.5.1 against the same fixture).

…cloned upstream fixtures

The `ci.yml` `_selftest` job runs `pnpm lint` after the `build-rspack`
composite action has already cloned upstream rspack into
`workspace/rspack/`. That tree contains intentionally invalid TypeScript
fixtures (e.g. `tests/rspack-test/statsOutputCases/builtin-swc-loader-parse-error/index.ts`
with `export error;`, and `.../diagnosticsCases/factorize/mismatched-module-type/app.ts`
with JSX in a `.ts` file) used to test rspack's compiler error reporting.

Since `@rslint/core` 0.5.2 aligned `--type-check` with `tsc --noEmit`
semantics (web-infra-dev/rslint#823), rslint runs a TypeScript program
over the project's `tsconfig.json` `include`/`exclude` and surfaces the
parser's `TS1110` / `TS1128` diagnostics. The repo's tsconfig had
`include: ["./**/*.ts"]` with only `node_modules` excluded, so the
rspack fixture files were getting parsed and breaking Lint on every
recent `ci.yml` run (visible on #49, #50, #25 and every renovate PR
since 2026-05-20).

`ignores`/`files` in `rslint.config.ts` only affect lint rules — they do
not gate the TypeScript program's file discovery. The fix has to live in
`tsconfig.json`.

Verified locally with the fixture in place: before this change `pnpm lint`
errors on `TypeScript(TS1128) — Declaration or statement expected.` at
`workspace/rspack/tests/rspack-test/statsOutputCases/builtin-swc-loader-parse-error/index.ts:1:1`;
with the change applied, `Found 0 errors and 0 warnings`.
@fi3ework fi3ework merged commit db5305b into main May 25, 2026
27 of 33 checks passed
@fi3ework fi3ework deleted the fix/ci-rslint-exclude-workspace branch May 25, 2026 10:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant