Skip to content

tsc --init should generate tsconfig.json without comments #53746

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

Closed
5 tasks done
yukulele opened this issue Apr 11, 2023 · 4 comments
Closed
5 tasks done

tsc --init should generate tsconfig.json without comments #53746

yukulele opened this issue Apr 11, 2023 · 4 comments
Labels
Duplicate An existing issue was already created

Comments

@yukulele
Copy link

Suggestion

πŸ” Search Terms

  • tsconfig comments tsc init

βœ… Viability Checklist

My suggestion meets these guidelines:

  • This wouldn't be a breaking change in existing TypeScript/JavaScript code
  • This wouldn't change the runtime behavior of existing JavaScript code
  • This could be implemented without emitting different JS based on the types of the expressions
  • This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
  • This feature would agree with the rest of TypeScript's Design Goals.

⭐ Suggestion

tsc --init creates a configuration file with all possible parameters commented with their descriptions.

  • It is very difficult to read and use.
  • Each time I start with the tedious task of deleting all these comments.

I think tsc --init should create a tsconfig.json file without comments.

Why?

  • tsconfig.json is not the documentation.
  • tsc --init give a link to the documentation (https://aka.ms/tsconfig) in the terminal.
  • A modern editor is able to suggest possible options and display their descriptions and link to their documentation.

Expected tsconfig.json content after tsc --init:

{
  "compilerOptions": {
    "target": "es2016",
    "module": "commonjs",
    "esModuleInterop": true,
    "forceConsistentCasingInFileNames": true,
    "strict": true,
    "skipLibCheck": true,
  }
}
@yukulele yukulele changed the title Stop delivering all possible configuration parameters in the default configuration file on tsc --init tsc --init should generate tsconfig.json without comments Apr 11, 2023
@MartinJohns
Copy link
Contributor

Duplicate of #46150.

@yukulele
Copy link
Author

Duplicate of #46150.

I make the same observation as on this issue but it is not the same proposal.

@MartinJohns
Copy link
Contributor

It's the same proposal, just a different solution to solve the problem. That usually does not warrant a new issue, it's better suited as a comment.

@RyanCavanaugh RyanCavanaugh added the Duplicate An existing issue was already created label Apr 12, 2023
@typescript-bot
Copy link
Collaborator

This issue has been marked as a 'Duplicate' and has seen no recent activity. It has been automatically closed for house-keeping purposes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Duplicate An existing issue was already created
Projects
None yet
Development

No branches or pull requests

4 participants