Skip to content

Commit

Permalink
feat(react-typescript): disable prop-types (#134)
Browse files Browse the repository at this point in the history
* feat(react-typescript): disable prop-types

* fix react-typescript/ok.tsx

* fix code style test
  • Loading branch information
toshi-toma authored Jun 18, 2019
1 parent 1d69364 commit 0ee3b18
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion lib/react-typescript.js
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", {}]
}
};
4 changes: 2 additions & 2 deletions test/fixtures/react-typescript/ok.tsx
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;

0 comments on commit 0ee3b18

Please sign in to comment.