feat(create-vite): stricter TS configs in templates #12604
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I started with
allowImportingTsExtensions
and then realised some where not enough strict and not homogenous at all.Changes:
ES2021.string
to the listallowSyntheticDefaultImports
andallowSyntheticDefaultImports
: Personally I don't like using a default export when the lib doesn't explicitly set one and expecting it to work because bundler are doing crazy amount of interop.noPropertyAccessFromIndexSignature
: I started using it recently and I quite like it. I'm hesitant to add ituseUnknownInCatchVariables
: could be added but it's really annoying to not be able to set the error type toAxiosError
for ex.Note: I did not touch the svelte config because it already extend the one from the svelte team (and I know they don't use TS the same way as I do at all)