Use prop-types, update ESLint config.
This commit is contained in:
parent
186748ed55
commit
ddba8be6a4
@ -1,6 +1,11 @@
|
|||||||
{
|
{
|
||||||
"extends": ["env"],
|
"extends": ["env"],
|
||||||
"rules": {
|
"overrides": [
|
||||||
"react/prop-types": "off"
|
{
|
||||||
}
|
"files": ["components/**/*.js", "pages/**/*.js"],
|
||||||
|
"rules": {
|
||||||
|
"jsdoc/require-jsdoc": "off"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
import Head from 'next/head';
|
import Head from 'next/head';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
|
|
||||||
export const Page = ({ title, children }) => (
|
export const Page = ({ title, children }) => (
|
||||||
<>
|
<>
|
||||||
@ -8,3 +9,8 @@ export const Page = ({ title, children }) => (
|
|||||||
{children}
|
{children}
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Page.propTypes = {
|
||||||
|
title: PropTypes.string.isRequired,
|
||||||
|
children: PropTypes.node.isRequired
|
||||||
|
}
|
||||||
|
|||||||
1
app/package-lock.json
generated
1
app/package-lock.json
generated
@ -12,6 +12,7 @@
|
|||||||
"device-agnostic-ui": "^7.0.1",
|
"device-agnostic-ui": "^7.0.1",
|
||||||
"graphql": "^15.5.0",
|
"graphql": "^15.5.0",
|
||||||
"next": "^10.0.6",
|
"next": "^10.0.6",
|
||||||
|
"prop-types": "^15.7.2",
|
||||||
"react": "^17.0.1",
|
"react": "^17.0.1",
|
||||||
"react-dom": "^17.0.1"
|
"react-dom": "^17.0.1"
|
||||||
},
|
},
|
||||||
|
|||||||
@ -26,6 +26,7 @@
|
|||||||
"device-agnostic-ui": "^7.0.1",
|
"device-agnostic-ui": "^7.0.1",
|
||||||
"graphql": "^15.5.0",
|
"graphql": "^15.5.0",
|
||||||
"next": "^10.0.6",
|
"next": "^10.0.6",
|
||||||
|
"prop-types": "^15.7.2",
|
||||||
"react": "^17.0.1",
|
"react": "^17.0.1",
|
||||||
"react-dom": "^17.0.1"
|
"react-dom": "^17.0.1"
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user