Skip to content

tsgo checking JS file it shouldn't #1183

Closed
@jakebailey

Description

@jakebailey

In https://github.com/dimitropoulos/tsgo-repro-dist-exclude, tsgo says:

npx tsgo --listFiles
dist/yep.mjs:1:1 - error TS2578: Unused '@ts-expect-error' directive.

1 // @ts-expect-error
  ~~~~~~~~~~~~~~~~~~~
/home/jabaile/work/repros/tsgo-repro-dist-exclude/node_modules/.pnpm/@typescript+native-preview-linux-x64@7.0.0-dev.20250613.1/node_modules/@typescript/native-preview-linux-x64/lib/lib.d.ts
/home/jabaile/work/repros/tsgo-repro-dist-exclude/node_modules/.pnpm/@typescript+native-preview-linux-x64@7.0.0-dev.20250613.1/node_modules/@typescript/native-preview-linux-x64/lib/lib.es5.d.ts
/home/jabaile/work/repros/tsgo-repro-dist-exclude/node_modules/.pnpm/@typescript+native-preview-linux-x64@7.0.0-dev.20250613.1/node_modules/@typescript/native-preview-linux-x64/lib/lib.dom.d.ts
/home/jabaile/work/repros/tsgo-repro-dist-exclude/node_modules/.pnpm/@typescript+native-preview-linux-x64@7.0.0-dev.20250613.1/node_modules/@typescript/native-preview-linux-x64/lib/lib.webworker.importscripts.d.ts
/home/jabaile/work/repros/tsgo-repro-dist-exclude/node_modules/.pnpm/@typescript+native-preview-linux-x64@7.0.0-dev.20250613.1/node_modules/@typescript/native-preview-linux-x64/lib/lib.scripthost.d.ts
/home/jabaile/work/repros/tsgo-repro-dist-exclude/node_modules/.pnpm/@typescript+native-preview-linux-x64@7.0.0-dev.20250613.1/node_modules/@typescript/native-preview-linux-x64/lib/lib.decorators.d.ts
/home/jabaile/work/repros/tsgo-repro-dist-exclude/node_modules/.pnpm/@typescript+native-preview-linux-x64@7.0.0-dev.20250613.1/node_modules/@typescript/native-preview-linux-x64/lib/lib.decorators.legacy.d.ts
/home/jabaile/work/repros/tsgo-repro-dist-exclude/src/yep.ts
/home/jabaile/work/repros/tsgo-repro-dist-exclude/dist/yep.mjs

Found 1 error in dist/yep.mjs:1

But tsc says:

npx tsc --listFiles
/home/jabaile/work/repros/tsgo-repro-dist-exclude/node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.d.ts
/home/jabaile/work/repros/tsgo-repro-dist-exclude/node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es5.d.ts
/home/jabaile/work/repros/tsgo-repro-dist-exclude/node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.dom.d.ts
/home/jabaile/work/repros/tsgo-repro-dist-exclude/node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.webworker.importscripts.d.ts
/home/jabaile/work/repros/tsgo-repro-dist-exclude/node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.scripthost.d.ts
/home/jabaile/work/repros/tsgo-repro-dist-exclude/node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.decorators.d.ts
/home/jabaile/work/repros/tsgo-repro-dist-exclude/node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.decorators.legacy.d.ts
/home/jabaile/work/repros/tsgo-repro-dist-exclude/src/yep.ts
/home/jabaile/work/repros/tsgo-repro-dist-exclude/dist/yep.mjs

Seemingly, we are checking a file we shouldn't. Could be related to #931.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions