Skip to content

Commit 4615cf3

Browse files
committed
fix: remove flow-react-proptypes
1 parent 67fa77f commit 4615cf3

File tree

4 files changed

+12
-18
lines changed

4 files changed

+12
-18
lines changed

.babelrc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
"transform-class-properties",
99
"transform-export-extensions",
1010
"transform-object-rest-spread",
11-
"flow-react-proptypes"
1211
],
1312
"env": {
1413
"test": {
@@ -21,7 +20,6 @@
2120
"transform-class-properties",
2221
"transform-export-extensions",
2322
"transform-object-rest-spread",
24-
"flow-react-proptypes",
2523
"transform-runtime"
2624
]
2725
},
@@ -35,7 +33,6 @@
3533
"transform-class-properties",
3634
"transform-export-extensions",
3735
"transform-object-rest-spread",
38-
"flow-react-proptypes",
3936
"transform-runtime",
4037
"istanbul"
4138
]
@@ -55,7 +52,6 @@
5552
"transform-class-properties",
5653
"transform-export-extensions",
5754
"transform-object-rest-spread",
58-
"flow-react-proptypes",
5955
"transform-react-constant-elements"
6056
]
6157
}

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@
7171
"babel-cli": "^6.23.0",
7272
"babel-core": "^6.23.1",
7373
"babel-eslint": "^7.1.1",
74-
"babel-plugin-flow-react-proptypes": "^17.0.0",
7574
"babel-plugin-istanbul": "^4.0.0",
7675
"babel-plugin-syntax-dynamic-import": "^6.18.0",
7776
"babel-plugin-transform-class-properties": "^6.24.1",

src/index.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import * as React from 'react'
44
import loadScript, {getState} from './loadScript'
5+
import PropTypes from 'prop-types'
56

67
export type State = {
78
loading: boolean,
@@ -20,6 +21,13 @@ export default class ScriptLoader extends React.PureComponent<Props, State> {
2021
state = getState(this.props)
2122
promise: ?Promise<void>
2223

24+
static propTypes = {
25+
src: PropTypes.string.isRequired,
26+
onLoad: PropTypes.func,
27+
onError: PropTypes.func,
28+
children: PropTypes.func,
29+
}
30+
2331
load() {
2432
const {props} = this
2533
const {

yarn.lock

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,7 @@ babel-core@^6.23.1:
585585
slash "^1.0.0"
586586
source-map "^0.5.7"
587587

588-
babel-core@^6.25.0, babel-core@^6.26.0:
588+
babel-core@^6.26.0:
589589
version "6.26.0"
590590
resolved "https://registry.npmjs.org/babel-core/-/babel-core-6.26.0.tgz#af32f78b31a6fcef119c87b0fd8d9753f03a0bb8"
591591
dependencies:
@@ -769,15 +769,6 @@ babel-plugin-check-es2015-constants@^6.22.0:
769769
dependencies:
770770
babel-runtime "^6.22.0"
771771

772-
babel-plugin-flow-react-proptypes@^17.0.0:
773-
version "17.1.0"
774-
resolved "https://registry.yarnpkg.com/babel-plugin-flow-react-proptypes/-/babel-plugin-flow-react-proptypes-17.1.0.tgz#332509038c52da1b3bd9aef97136a03133b21184"
775-
dependencies:
776-
babel-core "^6.25.0"
777-
babel-template "^6.25.0"
778-
babel-traverse "^6.25.0"
779-
babel-types "^6.25.0"
780-
781772
babel-plugin-istanbul@^4.0.0:
782773
version "4.1.5"
783774
resolved "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.5.tgz#6760cdd977f411d3e175bb064f2bc327d99b2b6e"
@@ -1268,7 +1259,7 @@ [email protected], babel-runtime@^6.18.0, babel-runtime@^6.22.0, babel-runtim
12681259
core-js "^2.4.0"
12691260
regenerator-runtime "^0.11.0"
12701261

1271-
babel-template@^6.16.0, babel-template@^6.24.1, babel-template@^6.25.0, babel-template@^6.26.0:
1262+
babel-template@^6.16.0, babel-template@^6.24.1, babel-template@^6.26.0:
12721263
version "6.26.0"
12731264
resolved "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz#de03e2d16396b069f46dd9fff8521fb1a0e35e02"
12741265
dependencies:
@@ -1278,7 +1269,7 @@ babel-template@^6.16.0, babel-template@^6.24.1, babel-template@^6.25.0, babel-te
12781269
babylon "^6.18.0"
12791270
lodash "^4.17.4"
12801271

1281-
babel-traverse@^6.18.0, babel-traverse@^6.23.1, babel-traverse@^6.24.1, babel-traverse@^6.25.0, babel-traverse@^6.26.0:
1272+
babel-traverse@^6.18.0, babel-traverse@^6.23.1, babel-traverse@^6.24.1, babel-traverse@^6.26.0:
12821273
version "6.26.0"
12831274
resolved "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz#46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee"
12841275
dependencies:
@@ -1292,7 +1283,7 @@ babel-traverse@^6.18.0, babel-traverse@^6.23.1, babel-traverse@^6.24.1, babel-tr
12921283
invariant "^2.2.2"
12931284
lodash "^4.17.4"
12941285

1295-
babel-types@^6.18.0, babel-types@^6.19.0, babel-types@^6.23.0, babel-types@^6.24.1, babel-types@^6.25.0, babel-types@^6.26.0:
1286+
babel-types@^6.18.0, babel-types@^6.19.0, babel-types@^6.23.0, babel-types@^6.24.1, babel-types@^6.26.0:
12961287
version "6.26.0"
12971288
resolved "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497"
12981289
dependencies:

0 commit comments

Comments
 (0)