fix(ci): exclude workspace/** from tsconfig so _selftest lint stops scanning cloned rspack fixtures#51
Merged
Conversation
…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`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
ci.yml_selftestjob runspnpm lintafter thebuild-rspackcomposite action has already cloned upstream rspack into
workspace/rspack/. That tree contains intentionally invalid TypeScriptfixtures (e.g.
tests/rspack-test/statsOutputCases/builtin-swc-loader-parse-error/index.tswith
export error;, and.../diagnosticsCases/factorize/mismatched-module-type/app.tswith JSX in a
.tsfile) used to test rspack's compiler error reporting.Since
@rslint/core0.5.2 aligned--type-checkwithtsc --noEmitsemantics (web-infra-dev/rslint#823),
rslint runs a TypeScript program over the project's
tsconfig.jsoninclude/excludeand surfaces the parser'sTS1110/TS1128diagnostics. The repo's tsconfig had
include: ["./**/*.ts"]with onlynode_modulesexcluded, so the rspack fixture files were getting parsedand breaking Lint on every recent
ci.ymlrun — visible on #25, #49,#50, and every renovate PR going back to 2026-05-20 (
rspack (_selftest) FAILUREat stepLint).ignores/filesinrslint.config.tsonly affect lint rules — theydo not gate the TypeScript program's file discovery (verified empirically
with 7 config variants, all still parse
workspace/**). The fix has tolive in
tsconfig.json.Test plan
workspace/rspack/tests/rspack-test/statsOutputCases/builtin-swc-loader-parse-error/index.tscontainingexport error;— before the changepnpm linterrors withTypeScript(TS1128) — Declaration or statement expected.; with the changeFound 0 errors and 0 warnings.pnpm lintclean (rslint + prettier).rspack (_selftest)should reach theRun suite (selftest)step instead of failing atLint.Notes
This is independent of the @antfu/ni 0.21+ adaptation already merged in #25. The Lint scope problem has been present on
ci.ymlsince 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 sameTS1110/TS1128errors on 0.5.1 against the same fixture).