-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
feat!(app-vite): auto generate base tsconfig and types #17549
Open
yusufkandemir
wants to merge
27
commits into
quasarframework:dev
Choose a base branch
from
yusufkandemir:feat-auto-generate-base-tsconfig-and-types
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
feat!(app-vite): auto generate base tsconfig and types #17549
yusufkandemir
wants to merge
27
commits into
quasarframework:dev
from
yusufkandemir:feat-auto-generate-base-tsconfig-and-types
+476
−296
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
the Vite aliases were already there, thanks to this, TypeScript won't complain about using Capacitor deps inside src/ anymore
e.g. `@capacitor/dep/deep/import`
enforce TS >=5.4 to use module: 'preserve' forceConsistentCasingInFileNames defaults to true since TS 5.0 verbatimModuleSyntax will require user to update their codes jsx: preserve is no longer needed for Vue Language Tools strict: true and some of the other strict options will be added through a flag
compared to previous regular preset: noUnusedLocals is turned off as it produces extra noise when using ESLint, where the behavior is better as it's configurable compared to previous stricter config: noPropertyAccessFromIndexSignature is removed as it doesn't even allow process.env.DEV unless it's augmented explicitly, which we don't do at the moment. It enforces process.env['DEV'] instead, which is annoying and confusing to use. We can't augment the env variables as Node types enforce string, but our own types are actual boolean values. noImplicitReturns reduces the DX and is not that beneficial in app code compared to its use in library code. It still has it's uses, but it doesn't belong the usual strictness.
they were throwing errors, now we skip them for an even slimmer result
when .quasar/tsconfig.json is missing prior to generation
now it will re-generate the types if build.typescript or build.alias gets updated
to generate tsconfig and types
as feature flags are handled into .quasar now
The project creation tests use the latest version from the npm registry and not the local version. So, having failed tests is normal as the new template is not compatible with the latest app-vite release. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What kind of change does this PR introduce?
Does this PR introduce a breaking change?
tsconfig-preset
(from v1) andstricter-tsconfig-preset
(from older v2 beta) has been removed:For more info, please check the documentation changes in this PR.
The PR fulfills these requirements:
dev
branch (orv[X]
branch)Other information:
Initially discussed in #17493 (reply in thread)
quasar.config file > build > alias
) will now be automatically recognized by TS. No need to add them manually to tsconfig.json, or to use some Vite plugins that extract from tsconfig.json./src-capacitor
and in the root. Just installing into/src-capacitor
will now be enough.pwa-flag.d.ts
),src/quasar.d.ts
, andsrc/shims-vue.d.ts
will be generated into.quasar
, hiding some complexity from the users and making updates easierWill be ported to app-webpack in a separate PR.