Skip to content
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

Template tsconfig overridden by create-astro typescript strict/stricter #4297

Closed
1 task done
laesse opened this issue Aug 13, 2022 · 0 comments · Fixed by #4439
Closed
1 task done

Template tsconfig overridden by create-astro typescript strict/stricter #4297

laesse opened this issue Aug 13, 2022 · 0 comments · Fixed by #4439
Assignees
Labels
- P4: important Violate documented behavior or significantly impacts performance (priority) pkg: create-astro Related to the `create-astro` package (scope)

Comments

@laesse
Copy link

laesse commented Aug 13, 2022

What version of astro are you using?

1.0.4

Are you using an SSR adapter? If so, which one?

None

What package manager are you using?

pnpm

What operating system are you using?

Mac

Describe the Bug

Issue description

When choosing the strict or stricter typescript setup option in astro-create it overrides the default tsconfig.json.

In my specific case, it overrode the default solid options. These are required for a working typescript-solid configuration.

    "jsx": "preserve",
    "jsxImportSource": "solid-js",

Possible solutions

In my opinion, there are two possible solutions:

  1. merge the compilerOptions of the template and the tsconfig.[strict|stricter].json
    • either extend the template tsconfig with the strict/stricter tsconfig -> this would require you to add the strict/stricter file as a dev dependency in some shape or form and it wouldn't be transparent which options are applied.
    • or merge them in astro-create during the creation of the tsconfig.json -> this would remove the comments in the resulting tsconfig.json file (except you implement the merge very hacky Eg. writing the individual strict + comment lines)
  2. fix the specific bug for the solid-framework template with headers like these /** @jsxImportSource solid-js */

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-4hojby?file=tsconfig.json&view=editor

Participation

  • I am willing to submit a pull request for this issue.
@laesse laesse changed the title Template tsconfig overriden by create-astro ts strict/stricter Template tsconfig overridden by create-astro typescript strict/stricter Aug 13, 2022
@natemoo-re natemoo-re added - P4: important Violate documented behavior or significantly impacts performance (priority) pkg: create-astro Related to the `create-astro` package (scope) labels Aug 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- P4: important Violate documented behavior or significantly impacts performance (priority) pkg: create-astro Related to the `create-astro` package (scope)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants