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

cleanup default tsconfig #6039

Closed
Tracked by #6000
kanej opened this issue Dec 10, 2024 · 2 comments
Closed
Tracked by #6000

cleanup default tsconfig #6039

kanej opened this issue Dec 10, 2024 · 2 comments
Assignees
Labels
status:ready This issue is ready to be worked on v-next A Hardhat v3 development task
Milestone

Comments

@kanej
Copy link
Member

kanej commented Dec 10, 2024

The generated tsconfig.json by hardhat3 --init has two extra/invalid properties that are copied from a parent project. We should remove them: display and _version.

Also the flags in the generated tsconfig.json are using lowercase, instead of the official PascalCase. It will be accepted by tsc, but it might trip/fail checking by external json-schema validators/linters. For example node16 and es2022 and es2023.

We should ensure that the default configs will pass json-schema linting.

Originally report by Omar while testing the Alpha.

@kanej kanej mentioned this issue Dec 10, 2024
25 tasks
@github-actions github-actions bot added the status:ready This issue is ready to be worked on label Dec 10, 2024
@github-project-automation github-project-automation bot moved this to Backlog in Hardhat Dec 10, 2024
@kanej kanej moved this from Backlog to To-do in Hardhat Dec 10, 2024
@kanej kanej added the v-next A Hardhat v3 development task label Dec 10, 2024
@kanej kanej added this to the Public Alpha milestone Dec 10, 2024
@antico5
Copy link
Contributor

antico5 commented Dec 11, 2024

@kanej
The display and _version properties have been already remove by Pato.

About using pascal case for the string values, it seems that lowercase is the predominant casing: https://www.typescriptlang.org/tsconfig/. Checked examples for "module", "target", etc.

Should we just close this one ?

@antico5 antico5 moved this from To-do to In Progress in Hardhat Dec 11, 2024
@kanej
Copy link
Member Author

kanej commented Dec 12, 2024

Agreed.
If you generate a tsconfig with tsc --init then the values are lowercase:

Image

@kanej kanej closed this as completed Dec 12, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in Hardhat Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:ready This issue is ready to be worked on v-next A Hardhat v3 development task
Projects
Archived in project
Development

No branches or pull requests

2 participants