Skip to content

Commit 0ee3b18

Browse files
authored
feat(react-typescript): disable prop-types (#134)
* feat(react-typescript): disable prop-types * fix react-typescript/ok.tsx * fix code style test
1 parent 1d69364 commit 0ee3b18

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

lib/react-typescript.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
module.exports = {
22
rules: {
3-
"react/jsx-filename-extension": ["error", { extensions: [".tsx"] }]
3+
"react/jsx-filename-extension": ["error", { extensions: [".tsx"] }],
4+
"react/prop-types": ["off", {}]
45
}
56
};
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import React from 'react';
1+
import * as React from 'react';
22

33
interface Props {
44
name: string;
55
}
66

7-
const Foo = ({name}: Props) => <p>Foo{name}</p>;
7+
const Foo: React.FC<Props> = ({name}) => <p>Foo{name}</p>;
88

99
const Component = () => <Foo name="bar" />;
1010
export default Component;

0 commit comments

Comments
 (0)