Skip to content
This repository was archived by the owner on Feb 27, 2024. It is now read-only.

Commit a1a6ded

Browse files
author
Greg Rickaby
authored
Merge pull request #108 from WebDevStudios/fix/linter-errors
Fix/linter errors
2 parents 3b8ce41 + 260f6a7 commit a1a6ded

File tree

3 files changed

+20
-4
lines changed

3 files changed

+20
-4
lines changed

components/molecules/Navigation/Navigation.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,16 @@ import isLinkActive from '@/functions/isLinkActive'
22
import cn from 'classnames'
33
import Link from 'next/link'
44
import {useRouter} from 'next/router'
5+
import PropTypes from 'prop-types'
56
import styles from './Navigation.module.css'
67

78
/**
89
* Render the Navigation component.
910
*
1011
* @author WebDevStudios
11-
* @param {object} props Navigation props.
12-
* @param {array} props.menu Array of menu items.
13-
* @param {string} props.className Optional classname for the element.
12+
* @param {object} props Navigation props.
13+
* @param {Array} props.menu Array of menu items.
14+
* @param {string} props.className Optional classname for the element.
1415
* @return {Element} The Navigation component.
1516
*/
1617
export default function Navigation({menu, className}) {
@@ -67,3 +68,8 @@ export default function Navigation({menu, className}) {
6768
</>
6869
)
6970
}
71+
72+
Navigation.propTypes = {
73+
className: PropTypes.string,
74+
menu: PropTypes.arrayOf(PropTypes.object)
75+
}

docs/DocTable/DocTable.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,14 @@ import React from 'react'
33
import styles from './DocTable.module.css'
44

55
/**
6+
* Render the DocTable component.
7+
*
68
* This component is used in documentaion-only stories to display tabular documentation.
9+
*
10+
* @param {*} props The DocTable attributes as props.
11+
* @return {Element} The DocTable component.
712
*/
8-
const DocTable = (props) => {
13+
function DocTable(props) {
914
return (
1015
<div className={styles.docTableWrap}>
1116
<table className={styles.docTable}>{props.children}</table>

pages/index.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import PropTypes from 'prop-types'
12
import getPostTypeStaticProps from '@/api/wordpress/_global/getPostTypeStaticProps'
23
import Layout from '@/components/common/Layout'
34
import Hero from '@/components/molecules/Hero'
@@ -51,6 +52,10 @@ export default function HomePage({post}) {
5152
)
5253
}
5354

55+
HomePage.propTypes = {
56+
post: PropTypes.object
57+
}
58+
5459
/**
5560
* Get post static props.
5661
*

0 commit comments

Comments
 (0)