You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't think that's what that code means; CheckJs is a tristate between true, false, and unset. If it's unset, that will evaluate to false. Also, the linked code is GetAllowJS, so this is about how allowJs behaves.
I'm seeing this behaviour too - our repo has allowJs set globally, but checkJs set on a per-file basis via comments, and running tsgo lists errors in a lot of JS files.
Let me know if there's any more information needed
Activity
[-]Some config option defaults have changed in typescript-go[/-][+]checkJs default has changed in tsgo[/+]jakebailey commentedon May 23, 2025
I don't think that's what that code means;
CheckJs
is a tristate between true, false, and unset. If it's unset, that will evaluate tofalse
. Also, the linked code isGetAllowJS
, so this is about howallowJs
behaves.jakebailey commentedon May 23, 2025
Did you confuse
options.CheckJs == TSTrue
foroptions.CheckJs = TSTrue
, an assignment?issacgerges commentedon May 23, 2025
Sorry, I attributed the wrong line of code. I have a minimal repro that shows the default has changed. Will send it momentarily
issacgerges commentedon May 23, 2025
https://github.com/issacgerges/tsgo-checkjs/tree/main
jakebailey commentedon May 23, 2025
Can you paste the result of
tsgo --showConfig
?issacgerges commentedon May 23, 2025
jakebailey commentedon May 23, 2025
Thanks, this is a bug.
glenjamin commentedon May 28, 2025
I'm seeing this behaviour too - our repo has
allowJs
set globally, butcheckJs
set on a per-file basis via comments, and runningtsgo
lists errors in a lot of JS files.Let me know if there's any more information needed
jakebailey commentedon May 28, 2025
What errors are you seeing specifically? I believe I'll have fixed this in #930 when merged. You could build from that PR and check, too.