Merge pull request #37907 from Jack-Works/feat/class-to-classname

feat: add a codefix to fix class to className in react & add spelling suggest for JSX attributes
This commit is contained in:
Daniel Rosenwasser
2020-06-22 18:32:24 -07:00
committed by GitHub
11 changed files with 314 additions and 14 deletions

View File

@@ -0,0 +1,16 @@
// @jsx: react
/// <reference path="/.lib/react16.d.ts" />
import * as React from "react";
function MyComp2(props: { className?: string, htmlFor?: string }) {
return null!;
}
class MyComp extends React.Component<{ className?: string, htmlFor?: string }> { }
<a class="" />;
<a for="" />; // should have no fix
<label for="" />;
<label for="" class="" />;
<MyComp class="" />;
<MyComp2 class="" />;
<MyComp for="" />;
<MyComp2 for="" />;