We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1d69364 commit 0ee3b18Copy full SHA for 0ee3b18
lib/react-typescript.js
@@ -1,5 +1,6 @@
1
module.exports = {
2
rules: {
3
- "react/jsx-filename-extension": ["error", { extensions: [".tsx"] }]
+ "react/jsx-filename-extension": ["error", { extensions: [".tsx"] }],
4
+ "react/prop-types": ["off", {}]
5
}
6
};
test/fixtures/react-typescript/ok.tsx
@@ -1,10 +1,10 @@
-import React from 'react';
+import * as React from 'react';
interface Props {
name: string;
7
-const Foo = ({name}: Props) => <p>Foo{name}</p>;
+const Foo: React.FC<Props> = ({name}) => <p>Foo{name}</p>;
8
9
const Component = () => <Foo name="bar" />;
10
export default Component;
0 commit comments