Closed
Description
Bug Report
after enabling noUncheckedIndexedAccess compilation rule I noticed TSC is complaining about the rule being violated inside node_modules/someLib/someFile.tsx
.
what i have tried
1- skipLibCheck: which will only exclude .d.ts
files
2- explicitly excluding node_modules which will not work because imported files are always part of the compilation!
due to:
You're most likely including the source file in your project. `exclude` only acts as a filter on top of `include`, but imported files are always part of the compilation. You can use the [--explainFiles](https://www.typescriptlang.org/tsconfig/#explainFiles) compiler option to figure out why the file was included in the compilation.
This might be relevant to you: #30511
Originally posted by @MartinJohns in #47387 (comment)
this basically means that if one wants to enable any type check ALL the libraries used by me have to have the same level of strictness and have to enable the same type checks which makes no sense for something optional like noUncheckedIndexedAccess.
is there a way to really exclude type checking for files inside node_modules?