Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: handle checkJs property if set in tsconfig #67

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

tkgroot
Copy link

@tkgroot tkgroot commented Apr 4, 2024

if the tsconfig.json contains the property checkJs: true, javascript files are not checked by tsc-files since the files filters do ignore file extensions other than ts and tsx. However, since checkJs should include all valid javascript file extensions, it is expected that it will respect the setting of the tsconfig.json and take the additional file extensions js, cjs and mjs into account.

- remove eval function
- add function to remove comments from json

Signed-off-by: Tobias Kuppens Groot <[email protected]>
- add file ext for js,cjs,mjs files which would be used if checkJs
flag has been set by tsconfig

Signed-off-by: Tobias Kuppens Groot <[email protected]>
@jonasgeiler
Copy link

Same problem as in #71: I don't believe you have to check if allowJs or checkJs are enabled. It's probably fine to just always look for .js files and .ts files in the CLI arguments, since you wouldn't pass JS files to tsc-files if you didn't want tsc-files to check them, right? Same as you wouldn't give JS files to tsc if you didn't want tsc to check them.

At least that's what I did in my fork at @jonasgeiler/tsc-files.

Also kind of a duplicate of #55.

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.

2 participants