-
Couldn't load subscription status.
- Fork 13.1k
Closed as not planned
Labels
Good First IssueWell scoped, documented and has the green lightWell scoped, documented and has the green lightHelp WantedYou can do thisYou can do thisSuggestionAn idea for TypeScriptAn idea for TypeScript
Milestone
Description
To enable JSX syntax in TypeScript you need two steps:
- add
"jsx": "react"to"compilerOptions"intsconfig.json - use
.tsxextension
This is quite troublesome if you want to reuse certain generators/boilerplates/build scripts for us. It is also against the single source of truth principle and can be confusing. I recently stumbled over a bug where we used the .tsx extension, but hadn't configured the tsconfig.json.
There was a lot of discussion recently about changing the .js extension to .mjs to introduce ES6 modules to Node and many people are against that and prefer to have an additional flag in the package.json.
I'd like to see the same for TypeScript and JSX:
- the
.tsxextension is purely optional - only
"jsx": "react"intsconfig.jsonis mandatory
cogell, sindresorhus, MichaelGatesDev and blacksansa
Metadata
Metadata
Assignees
Labels
Good First IssueWell scoped, documented and has the green lightWell scoped, documented and has the green lightHelp WantedYou can do thisYou can do thisSuggestionAn idea for TypeScriptAn idea for TypeScript