Skip to content

Commit

Permalink
ci: Fixes linting error for demo prop types (#225)
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonmit committed Jul 5, 2019
1 parent 904542d commit 4d537ad
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 14 deletions.
8 changes: 7 additions & 1 deletion examples/dummy-app/src/posts.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from 'react';
import PropTypes from 'prop-types';
import {
List,
Edit,
Expand Down Expand Up @@ -28,11 +29,16 @@ const PostFilter = props => (
</Filter>
);

// eslint-disable-next-line react/prop-types
const PostTitle = ({ record }) => {
return <span>Posts - {record ? `${record.title}` : ''}</span>;
};

PostTitle.propTypes = {
record: PropTypes.PropTypes.shape({
title: PropTypes.string
})
};

export const PostList = props => (
<List
title="Posts"
Expand Down
8 changes: 7 additions & 1 deletion examples/dummy-app/src/todos.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from 'react';
import PropTypes from 'prop-types';
import {
List,
Edit,
Expand Down Expand Up @@ -29,11 +30,16 @@ const TodoFilter = props => (
</Filter>
);

// eslint-disable-next-line react/prop-types
const TodoTitle = ({ record }) => {
return <span>Todos - {record ? `${record.title}` : ''}</span>;
};

TodoTitle.propTypes = {
record: PropTypes.PropTypes.shape({
title: PropTypes.string
})
};

export const TodoList = props => (
<List
title="Todos"
Expand Down
8 changes: 7 additions & 1 deletion examples/dummy-app/src/users.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from 'react';
import PropTypes from 'prop-types';
import {
List,
Datagrid,
Expand All @@ -9,11 +10,16 @@ import {
ShowButton
} from 'react-admin';

// eslint-disable-next-line react/prop-types
const UserTitle = ({ record }) => {
return <span>Users - {record ? `${record.name}` : ''}</span>;
};

UserTitle.propTypes = {
record: PropTypes.PropTypes.shape({
name: PropTypes.string
})
};

export const UserList = props => (
<List title="Users" {...props} sort={{ field: 'name', order: 'ASC' }}>
<Datagrid>
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@
"docsify-cli": "^4.3.0",
"eslint": "^5.16.0",
"eslint-config-prettier": "^4.3.0",
"eslint-plugin-import": "^2.17.3",
"eslint-plugin-import": "^2.18.0",
"eslint-plugin-node": "^9.1.0",
"eslint-plugin-prettier": "^3.1.0",
"eslint-plugin-react": "^7.13.0",
"eslint-plugin-react": "^7.14.2",
"formdata-polyfill": "^3.0.18",
"gh-pages": "^2.0.1",
"har-validator": "^5.1.3",
Expand Down
47 changes: 38 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5804,6 +5804,13 @@ define-properties@^1.1.2:
foreach "^2.0.5"
object-keys "^1.0.8"

define-properties@^1.1.3:
version "1.1.3"
resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1"
integrity sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==
dependencies:
object-keys "^1.0.12"

define-property@^0.2.5:
version "0.2.5"
resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116"
Expand Down Expand Up @@ -6696,7 +6703,7 @@ error@^7.0.0:
string-template "~0.2.1"
xtend "~4.0.0"

es-abstract@^1.11.0:
es-abstract@^1.11.0, es-abstract@^1.12.0:
version "1.13.0"
resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.13.0.tgz#ac86145fdd5099d8dd49558ccba2eaf9b88e24e9"
integrity sha512-vDZfg/ykNxQVwup/8E1BZhVzFfBxs9NqMzGcvIJrqg5k2/5Za2bWo40dK2J1pgLngZ7c+Shh8lwYtLGyrwPutg==
Expand Down Expand Up @@ -6813,10 +6820,10 @@ eslint-plugin-es@^1.4.0:
eslint-utils "^1.3.0"
regexpp "^2.0.1"

eslint-plugin-import@^2.17.3:
version "2.17.3"
resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.17.3.tgz#00548b4434c18faebaba04b24ae6198f280de189"
integrity sha512-qeVf/UwXFJbeyLbxuY8RgqDyEKCkqV7YC+E5S5uOjAp4tOc8zj01JP3ucoBM8JcEqd1qRasJSg6LLlisirfy0Q==
eslint-plugin-import@^2.18.0:
version "2.18.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.18.0.tgz#7a5ba8d32622fb35eb9c8db195c2090bd18a3678"
integrity sha512-PZpAEC4gj/6DEMMoU2Df01C5c50r7zdGIN52Yfi7CvvWaYssG7Jt5R9nFG5gmqodxNOz9vQS87xk6Izdtpdrig==
dependencies:
array-includes "^3.0.3"
contains-path "^0.1.0"
Expand Down Expand Up @@ -6849,16 +6856,18 @@ eslint-plugin-prettier@^3.1.0:
dependencies:
prettier-linter-helpers "^1.0.0"

eslint-plugin-react@^7.13.0:
version "7.13.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.13.0.tgz#bc13fd7101de67996ea51b33873cd9dc2b7e5758"
integrity sha512-uA5LrHylu8lW/eAH3bEQe9YdzpPaFd9yAJTwTi/i/BKTD7j6aQMKVAdGM/ML72zD6womuSK7EiGtMKuK06lWjQ==
eslint-plugin-react@^7.14.2:
version "7.14.2"
resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.14.2.tgz#94c193cc77a899ac0ecbb2766fbef88685b7ecc1"
integrity sha512-jZdnKe3ip7FQOdjxks9XPN0pjUKZYq48OggNMd16Sk+8VXx6JOvXmlElxROCgp7tiUsTsze3jd78s/9AFJP2mA==
dependencies:
array-includes "^3.0.3"
doctrine "^2.1.0"
has "^1.0.3"
jsx-ast-utils "^2.1.0"
object.entries "^1.1.0"
object.fromentries "^2.0.0"
object.values "^1.1.0"
prop-types "^15.7.2"
resolve "^1.10.1"

Expand Down Expand Up @@ -12034,6 +12043,16 @@ object.assign@4.1.0:
has-symbols "^1.0.0"
object-keys "^1.0.11"

object.entries@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.1.0.tgz#2024fc6d6ba246aee38bdb0ffd5cfbcf371b7519"
integrity sha512-l+H6EQ8qzGRxbkHOd5I/aHRhHDKoQXQ8g0BYt4uSweQU1/J6dZUOyWh9a2Vky35YCKjzmgxOzta2hH6kf9HuXA==
dependencies:
define-properties "^1.1.3"
es-abstract "^1.12.0"
function-bind "^1.1.1"
has "^1.0.3"

object.fromentries@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/object.fromentries/-/object.fromentries-2.0.0.tgz#49a543d92151f8277b3ac9600f1e930b189d30ab"
Expand Down Expand Up @@ -12064,6 +12083,16 @@ object.pick@^1.3.0:
dependencies:
isobject "^3.0.1"

object.values@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.0.tgz#bf6810ef5da3e5325790eaaa2be213ea84624da9"
integrity sha512-8mf0nKLAoFX6VlNVdhGj31SVYpaNFtUnuoOXWyFEstsWRgU837AK+JYM0iAxwkSzGRbwn8cbFmgbyxj1j4VbXg==
dependencies:
define-properties "^1.1.3"
es-abstract "^1.12.0"
function-bind "^1.1.1"
has "^1.0.3"

octal@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/octal/-/octal-1.0.0.tgz#63e7162a68efbeb9e213588d58e989d1e5c4530b"
Expand Down

0 comments on commit 4d537ad

Please sign in to comment.