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

Equivalent of babel-plugin-react-html-attrs #9327

Closed
tkrotoff opened this issue Jun 23, 2016 · 2 comments
Closed

Equivalent of babel-plugin-react-html-attrs #9327

tkrotoff opened this issue Jun 23, 2016 · 2 comments
Labels
Out of Scope This idea sits outside of the TypeScript language design constraints Suggestion An idea for TypeScript

Comments

@tkrotoff
Copy link

When using React and .tsx, keywords class and for should be replaced by className and htmlFor.

Babel features a plugin that allows the keywords class and for. Advantages:

  • shorter and proper syntax
  • make it easy to copy-paste HTML from documentation or examples

Would be nice to have the same feature with TypeScript.

Note: currently when writing class instead of className, no error is given: the resulting HTML silently remove any class attribute.

Related to #6843, #5595

@aluanhaddad
Copy link
Contributor

Seems like this should be a static error.

@RyanCavanaugh RyanCavanaugh added Suggestion An idea for TypeScript Out of Scope This idea sits outside of the TypeScript language design constraints labels Aug 18, 2016
@RyanCavanaugh
Copy link
Member

We're not really in the "I guess you really meant x" business. Someone can write a gulp-ts plugin or whatnot.

@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Out of Scope This idea sits outside of the TypeScript language design constraints Suggestion An idea for TypeScript
Projects
None yet
Development

No branches or pull requests

3 participants