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
We're using tsc-files in our pre-commit hook to check the staged files. When running the script, I was getting errors from tsc-files that were related to the Nativewind library, that I wasn't getting when running plain tsc. As it turns out, this was related to the files that we include in the projects tsconfig.json and that some of these includes are also required when running tsc-files.
Since tsc-files just generates an empty array without an option to fill the "includes" section, I created a patch that includes a new field from the tsconfig.json called "tsc-files-include" in the "includes"-Array from the generated tsconfig.json.
I use tsc-files for lint-staged, and I have .d.ts files in my project that are currently included with the include in my tsconfig.json file that end up excluded from tsc-files if they do not happen to be part of the change set. This causes my commit hook to fail in cases where any of the files passed to tsc-files need any of those .d.ts files.
I can fix this by adding these files to the lint-staged configuration that calls tsc-files, but it feels a smidge clunky to have to manage inclusion of my .d.ts files in two places. It would be nicer to manage it all from my tsconfig.json since that is naturally where I go when I see errors related to missing declarations.
We're using tsc-files in our pre-commit hook to check the staged files. When running the script, I was getting errors from
tsc-files
that were related to the Nativewind library, that I wasn't getting when running plaintsc
. As it turns out, this was related to the files that we include in the projectstsconfig.json
and that some of these includes are also required when runningtsc-files
.Since tsc-files just generates an empty array without an option to fill the
"includes"
section, I created a patch that includes a new field from thetsconfig.json
called"tsc-files-include"
in the"includes"
-Array from the generatedtsconfig.json
.Patch:
New field in tsconfig.json:
Do you think there's a way to provide some kind of configuration option for the values of the "includes"-Array of the generated tsconfig.json?
The text was updated successfully, but these errors were encountered: