Do not type check .js files in referenced node_modules under `--checkJs` and `--maxNodeModuleJsDepth` > 0
See original GitHub issue- Create a
jsconfig.json
- Set
checkJs
totrue
- run
tsc --p ./jsconfig.json
Expected:
no errors in node_modules\*\*.js
.
There is no really good fix for these issues. i would suggest not checking these files
Issue Analytics
- State:
- Created 5 years ago
- Reactions:7
- Comments:10 (1 by maintainers)
Top Results From Across the Web
TSConfig Reference - Docs on every TSConfig option
From allowJs to useDefineForClassFields the TSConfig reference includes information about all of the active compiler flags setting up a TypeScript project.
Read more >Why don't absolute paths work when importing a typescript file ...
I've tried so many solutions to absolute path problems. Consider the following as the main crux of the issue: Absolute paths work for...
Read more >Compiler Options - TypeScript
Option Type Default
‑‑allowJs boolean false
‑‑allowSyntheticDefaultImports boolean module === "system" or ‑‑esModuleInterop
‑‑allowUmdGlobalAccess boolean false
Read more >ts-node - npm
transpileOnly; typeCheck; compilerHost; files; ignoreDiagnostics ... ts-node is a TypeScript execution engine and REPL for Node.js.
Read more >node js unknown file extension .ts - You.com | The AI Search ...
If you don't want to remove "type": "module" (for example if you're using import ... folder depth used for checking JavaScript files from...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
My workaround is
tsc -p jsconfig.json --maxNodeModuleJsDepth 0
.For some reason it ignore
maxNodeModuleJsDepth
in jsconfig.json but setting it 0 explicitely fixes it for me.@apalaniuk The best contribution you could is to add to this issue. The OP is pretty detail free. I’d like to see:
If you can provide any of these, it will help move the issue along; if we can decide what to do, I think doing it will be pretty easy.