Skip to content

Commit b4d89f8

Browse files
committed
Enable prop-type eslint rule.
1 parent 45659ed commit b4d89f8

File tree

4 files changed

+5
-1
lines changed

4 files changed

+5
-1
lines changed

.eslintrc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
},
1313
"plugins": ["jest", "promise", "react", "react-hooks"],
1414
"rules": {
15-
"react/prop-types": "off",
1615
"react-hooks/rules-of-hooks": "error"
1716
},
1817
"settings": {

src/Async.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ export const createInstance = (defaultProps = {}, displayName = "Async") => {
161161

162162
if (PropTypes) {
163163
Async.propTypes = {
164+
children: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
164165
promiseFn: PropTypes.func,
165166
deferFn: PropTypes.func,
166167
watch: PropTypes.any,

src/Async.spec.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
/* eslint-disable react/prop-types */
2+
13
import "jest-dom/extend-expect"
24
import React from "react"
35
import { render, fireEvent, cleanup, waitForElement } from "react-testing-library"

src/useAsync.spec.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
/* eslint-disable react/prop-types */
2+
13
import "jest-dom/extend-expect"
24
import React from "react"
35
import { render, fireEvent, cleanup, waitForElement } from "react-testing-library"

0 commit comments

Comments
 (0)