From 5dbf30f21d7a3205c119d036d07edc022353f943 Mon Sep 17 00:00:00 2001 From: Joe Haddad Date: Tue, 25 Apr 2017 10:33:55 -0400 Subject: [PATCH] Use prop-types package (#2029) --- fixtures/kitchensink/.template.dependencies.json | 1 + fixtures/kitchensink/src/App.js | 3 ++- fixtures/kitchensink/src/features/env/NodePath.js | 3 ++- fixtures/kitchensink/src/features/syntax/ArrayDestructuring.js | 3 ++- fixtures/kitchensink/src/features/syntax/ArraySpread.js | 3 ++- fixtures/kitchensink/src/features/syntax/AsyncAwait.js | 3 ++- fixtures/kitchensink/src/features/syntax/ClassProperties.js | 3 ++- fixtures/kitchensink/src/features/syntax/ComputedProperties.js | 3 ++- .../kitchensink/src/features/syntax/CustomInterpolation.js | 3 ++- fixtures/kitchensink/src/features/syntax/DefaultParameters.js | 3 ++- .../kitchensink/src/features/syntax/DestructuringAndAwait.js | 3 ++- fixtures/kitchensink/src/features/syntax/Generators.js | 3 ++- .../kitchensink/src/features/syntax/ObjectDestructuring.js | 3 ++- fixtures/kitchensink/src/features/syntax/ObjectSpread.js | 3 ++- fixtures/kitchensink/src/features/syntax/Promises.js | 3 ++- fixtures/kitchensink/src/features/syntax/RestAndDefault.js | 3 ++- fixtures/kitchensink/src/features/syntax/RestParameters.js | 3 ++- .../kitchensink/src/features/syntax/TemplateInterpolation.js | 3 ++- 18 files changed, 35 insertions(+), 17 deletions(-) diff --git a/fixtures/kitchensink/.template.dependencies.json b/fixtures/kitchensink/.template.dependencies.json index ad2da83e197..63ecaf90db8 100644 --- a/fixtures/kitchensink/.template.dependencies.json +++ b/fixtures/kitchensink/.template.dependencies.json @@ -6,6 +6,7 @@ "chai": "3.5.0", "jsdom": "9.8.3", "mocha": "3.2.0", + "prop-types": "15.5.6", "test-integrity": "1.0.0" } } diff --git a/fixtures/kitchensink/src/App.js b/fixtures/kitchensink/src/App.js index 4edfcba9391..3e57c3c5a79 100644 --- a/fixtures/kitchensink/src/App.js +++ b/fixtures/kitchensink/src/App.js @@ -7,7 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -import React, { Component, PropTypes, createElement } from 'react'; +import React, { Component, createElement } from 'react'; +import PropTypes from 'prop-types'; class BuiltEmitter extends Component { static propTypes = { diff --git a/fixtures/kitchensink/src/features/env/NodePath.js b/fixtures/kitchensink/src/features/env/NodePath.js index eb1a45c0f12..a039cefedf3 100644 --- a/fixtures/kitchensink/src/features/env/NodePath.js +++ b/fixtures/kitchensink/src/features/env/NodePath.js @@ -7,7 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -import React, { Component, PropTypes } from 'react'; +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; import load from 'absoluteLoad'; export default class extends Component { diff --git a/fixtures/kitchensink/src/features/syntax/ArrayDestructuring.js b/fixtures/kitchensink/src/features/syntax/ArrayDestructuring.js index 3d18a5edeac..be6c39f9007 100644 --- a/fixtures/kitchensink/src/features/syntax/ArrayDestructuring.js +++ b/fixtures/kitchensink/src/features/syntax/ArrayDestructuring.js @@ -7,7 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -import React, { Component, PropTypes } from 'react'; +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; function load() { return [[1, '1'], [2, '2'], [3, '3'], [4, '4']]; diff --git a/fixtures/kitchensink/src/features/syntax/ArraySpread.js b/fixtures/kitchensink/src/features/syntax/ArraySpread.js index 4f9b174eb6f..eb7886aa47b 100644 --- a/fixtures/kitchensink/src/features/syntax/ArraySpread.js +++ b/fixtures/kitchensink/src/features/syntax/ArraySpread.js @@ -7,7 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -import React, { Component, PropTypes } from 'react'; +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; function load(users) { return [ diff --git a/fixtures/kitchensink/src/features/syntax/AsyncAwait.js b/fixtures/kitchensink/src/features/syntax/AsyncAwait.js index 6924d4f92d8..a60633460b3 100644 --- a/fixtures/kitchensink/src/features/syntax/AsyncAwait.js +++ b/fixtures/kitchensink/src/features/syntax/AsyncAwait.js @@ -7,7 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -import React, { Component, PropTypes } from 'react'; +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; async function load() { return [ diff --git a/fixtures/kitchensink/src/features/syntax/ClassProperties.js b/fixtures/kitchensink/src/features/syntax/ClassProperties.js index 7be21952da5..ed96d4f8c9e 100644 --- a/fixtures/kitchensink/src/features/syntax/ClassProperties.js +++ b/fixtures/kitchensink/src/features/syntax/ClassProperties.js @@ -7,7 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -import React, { Component, PropTypes } from 'react'; +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; export default class extends Component { static propTypes = { diff --git a/fixtures/kitchensink/src/features/syntax/ComputedProperties.js b/fixtures/kitchensink/src/features/syntax/ComputedProperties.js index fc64c2a86e3..38dc797a8d5 100644 --- a/fixtures/kitchensink/src/features/syntax/ComputedProperties.js +++ b/fixtures/kitchensink/src/features/syntax/ComputedProperties.js @@ -7,7 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -import React, { Component, PropTypes } from 'react'; +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; function load(prefix) { return [ diff --git a/fixtures/kitchensink/src/features/syntax/CustomInterpolation.js b/fixtures/kitchensink/src/features/syntax/CustomInterpolation.js index e97902545e1..1a0123391ce 100644 --- a/fixtures/kitchensink/src/features/syntax/CustomInterpolation.js +++ b/fixtures/kitchensink/src/features/syntax/CustomInterpolation.js @@ -7,7 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -import React, { Component, PropTypes } from 'react'; +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; const styled = ([style]) => style diff --git a/fixtures/kitchensink/src/features/syntax/DefaultParameters.js b/fixtures/kitchensink/src/features/syntax/DefaultParameters.js index 74bbe4d3c17..0a519eba839 100644 --- a/fixtures/kitchensink/src/features/syntax/DefaultParameters.js +++ b/fixtures/kitchensink/src/features/syntax/DefaultParameters.js @@ -7,7 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -import React, { Component, PropTypes } from 'react'; +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; function load(id = 0) { return [ diff --git a/fixtures/kitchensink/src/features/syntax/DestructuringAndAwait.js b/fixtures/kitchensink/src/features/syntax/DestructuringAndAwait.js index ede416944fc..d44f4cf222c 100644 --- a/fixtures/kitchensink/src/features/syntax/DestructuringAndAwait.js +++ b/fixtures/kitchensink/src/features/syntax/DestructuringAndAwait.js @@ -7,7 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -import React, { Component, PropTypes } from 'react'; +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; async function load() { return { diff --git a/fixtures/kitchensink/src/features/syntax/Generators.js b/fixtures/kitchensink/src/features/syntax/Generators.js index 77b7bffd252..2fe473d1339 100644 --- a/fixtures/kitchensink/src/features/syntax/Generators.js +++ b/fixtures/kitchensink/src/features/syntax/Generators.js @@ -7,7 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -import React, { Component, PropTypes } from 'react'; +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; function* load(limit) { let i = 1; diff --git a/fixtures/kitchensink/src/features/syntax/ObjectDestructuring.js b/fixtures/kitchensink/src/features/syntax/ObjectDestructuring.js index 14fa6969ee5..2994d14af4d 100644 --- a/fixtures/kitchensink/src/features/syntax/ObjectDestructuring.js +++ b/fixtures/kitchensink/src/features/syntax/ObjectDestructuring.js @@ -7,7 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -import React, { Component, PropTypes } from 'react'; +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; function load() { return [ diff --git a/fixtures/kitchensink/src/features/syntax/ObjectSpread.js b/fixtures/kitchensink/src/features/syntax/ObjectSpread.js index bf3fb26b80c..65705f11bbd 100644 --- a/fixtures/kitchensink/src/features/syntax/ObjectSpread.js +++ b/fixtures/kitchensink/src/features/syntax/ObjectSpread.js @@ -7,7 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -import React, { Component, PropTypes } from 'react'; +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; function load(baseUser) { return [ diff --git a/fixtures/kitchensink/src/features/syntax/Promises.js b/fixtures/kitchensink/src/features/syntax/Promises.js index 26438012cf2..e626de5d818 100644 --- a/fixtures/kitchensink/src/features/syntax/Promises.js +++ b/fixtures/kitchensink/src/features/syntax/Promises.js @@ -7,7 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -import React, { Component, PropTypes } from 'react'; +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; function load() { return Promise.resolve([ diff --git a/fixtures/kitchensink/src/features/syntax/RestAndDefault.js b/fixtures/kitchensink/src/features/syntax/RestAndDefault.js index 411ce33d4b9..dc2a1563a41 100644 --- a/fixtures/kitchensink/src/features/syntax/RestAndDefault.js +++ b/fixtures/kitchensink/src/features/syntax/RestAndDefault.js @@ -7,7 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -import React, { Component, PropTypes } from 'react'; +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; function load({ id, ...rest } = { id: 0, user: { id: 42, name: '42' } }) { return [ diff --git a/fixtures/kitchensink/src/features/syntax/RestParameters.js b/fixtures/kitchensink/src/features/syntax/RestParameters.js index aaca55c0f96..e703a33cc86 100644 --- a/fixtures/kitchensink/src/features/syntax/RestParameters.js +++ b/fixtures/kitchensink/src/features/syntax/RestParameters.js @@ -7,7 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -import React, { Component, PropTypes } from 'react'; +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; function load({ id = 0, ...rest }) { return [ diff --git a/fixtures/kitchensink/src/features/syntax/TemplateInterpolation.js b/fixtures/kitchensink/src/features/syntax/TemplateInterpolation.js index 738a0b103ef..5aba5da6272 100644 --- a/fixtures/kitchensink/src/features/syntax/TemplateInterpolation.js +++ b/fixtures/kitchensink/src/features/syntax/TemplateInterpolation.js @@ -7,7 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -import React, { Component, PropTypes } from 'react'; +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; function load(name) { return [