-
Notifications
You must be signed in to change notification settings - Fork 1
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
config: update verbatimModuleSyntax
in lenient tsconfig.json
#103
base: develop
Are you sure you want to change the base?
Conversation
verbatimModuleSyntax
in lenient tsconfig.json
@@ -15,7 +15,8 @@ | |||
"esModuleInterop": false, | |||
"resolveJsonModule": true, | |||
"allowSyntheticDefaultImports": true, | |||
"preserveWatchOutput": true | |||
"preserveWatchOutput": true, | |||
"verbatimModuleSyntax": true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dv-usama-ansari is the lenient config the right place for this? I would put it into the normal one because that's the one loaded by VSCode. Also, it it the one which contains the strict changes, thus not breaking any existing pipelines.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, please put it in the normal one. The intention of this setting is that the developers should see the warning right in the editor and make changes accordingly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feel free to adjust it and I will review again 👍
What is
verbatimModuleSyntax
?Why do we need it?
verbatimModuleSyntax
:We see no errors when an import which can be used only as a
type
. This would lead to increased bundle size, since it would also compile the imports within the module.Also, coming from datavisyn/visyn_core@274fcfb#diff-c767fb22b4d7242d9d2848e5d53d098f77647cf31592ceed92875cbafdce2684, we have run into this problem where the module contained interfaces as well as React imports from a component and the bundler messed up the entire setup which led everything to crash
verbatimModuleSyntax
enabled:We see errors right in the editor which suggests to import
type
instead of the interface name so that it is excluded from bundling.These lint errors are autofixable (unfortunately not from the CLI)