-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(react-typescript): disable prop-types (#134)
* feat(react-typescript): disable prop-types * fix react-typescript/ok.tsx * fix code style test
- Loading branch information
1 parent
1d69364
commit 0ee3b18
Showing
2 changed files
with
4 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
module.exports = { | ||
rules: { | ||
"react/jsx-filename-extension": ["error", { extensions: [".tsx"] }] | ||
"react/jsx-filename-extension": ["error", { extensions: [".tsx"] }], | ||
"react/prop-types": ["off", {}] | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import React from 'react'; | ||
import * as React from 'react'; | ||
|
||
interface Props { | ||
name: string; | ||
} | ||
|
||
const Foo = ({name}: Props) => <p>Foo{name}</p>; | ||
const Foo: React.FC<Props> = ({name}) => <p>Foo{name}</p>; | ||
|
||
const Component = () => <Foo name="bar" />; | ||
export default Component; |