Skip to content

Commit d65070e

Browse files
authored
Use prop-types package (facebook#2029)
1 parent 33a9700 commit d65070e

18 files changed

+35
-17
lines changed

packages/react-scripts/fixtures/kitchensink/.template.dependencies.json

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"chai": "3.5.0",
77
"jsdom": "9.8.3",
88
"mocha": "3.2.0",
9+
"prop-types": "15.5.6",
910
"test-integrity": "1.0.0"
1011
}
1112
}

packages/react-scripts/fixtures/kitchensink/src/App.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
* of patent rights can be found in the PATENTS file in the same directory.
88
*/
99

10-
import React, { Component, PropTypes, createElement } from 'react';
10+
import React, { Component, createElement } from 'react';
11+
import PropTypes from 'prop-types';
1112

1213
class BuiltEmitter extends Component {
1314
static propTypes = {

packages/react-scripts/fixtures/kitchensink/src/features/env/NodePath.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
* of patent rights can be found in the PATENTS file in the same directory.
88
*/
99

10-
import React, { Component, PropTypes } from 'react';
10+
import React, { Component } from 'react';
11+
import PropTypes from 'prop-types';
1112
import load from 'absoluteLoad';
1213

1314
export default class extends Component {

packages/react-scripts/fixtures/kitchensink/src/features/syntax/ArrayDestructuring.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
* of patent rights can be found in the PATENTS file in the same directory.
88
*/
99

10-
import React, { Component, PropTypes } from 'react';
10+
import React, { Component } from 'react';
11+
import PropTypes from 'prop-types';
1112

1213
function load() {
1314
return [[1, '1'], [2, '2'], [3, '3'], [4, '4']];

packages/react-scripts/fixtures/kitchensink/src/features/syntax/ArraySpread.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
* of patent rights can be found in the PATENTS file in the same directory.
88
*/
99

10-
import React, { Component, PropTypes } from 'react';
10+
import React, { Component } from 'react';
11+
import PropTypes from 'prop-types';
1112

1213
function load(users) {
1314
return [

packages/react-scripts/fixtures/kitchensink/src/features/syntax/AsyncAwait.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
* of patent rights can be found in the PATENTS file in the same directory.
88
*/
99

10-
import React, { Component, PropTypes } from 'react';
10+
import React, { Component } from 'react';
11+
import PropTypes from 'prop-types';
1112

1213
async function load() {
1314
return [

packages/react-scripts/fixtures/kitchensink/src/features/syntax/ClassProperties.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
* of patent rights can be found in the PATENTS file in the same directory.
88
*/
99

10-
import React, { Component, PropTypes } from 'react';
10+
import React, { Component } from 'react';
11+
import PropTypes from 'prop-types';
1112

1213
export default class extends Component {
1314
static propTypes = {

packages/react-scripts/fixtures/kitchensink/src/features/syntax/ComputedProperties.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
* of patent rights can be found in the PATENTS file in the same directory.
88
*/
99

10-
import React, { Component, PropTypes } from 'react';
10+
import React, { Component } from 'react';
11+
import PropTypes from 'prop-types';
1112

1213
function load(prefix) {
1314
return [

packages/react-scripts/fixtures/kitchensink/src/features/syntax/CustomInterpolation.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
* of patent rights can be found in the PATENTS file in the same directory.
88
*/
99

10-
import React, { Component, PropTypes } from 'react';
10+
import React, { Component } from 'react';
11+
import PropTypes from 'prop-types';
1112

1213
const styled = ([style]) =>
1314
style

packages/react-scripts/fixtures/kitchensink/src/features/syntax/DefaultParameters.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
* of patent rights can be found in the PATENTS file in the same directory.
88
*/
99

10-
import React, { Component, PropTypes } from 'react';
10+
import React, { Component } from 'react';
11+
import PropTypes from 'prop-types';
1112

1213
function load(id = 0) {
1314
return [

packages/react-scripts/fixtures/kitchensink/src/features/syntax/DestructuringAndAwait.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
* of patent rights can be found in the PATENTS file in the same directory.
88
*/
99

10-
import React, { Component, PropTypes } from 'react';
10+
import React, { Component } from 'react';
11+
import PropTypes from 'prop-types';
1112

1213
async function load() {
1314
return {

packages/react-scripts/fixtures/kitchensink/src/features/syntax/Generators.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
* of patent rights can be found in the PATENTS file in the same directory.
88
*/
99

10-
import React, { Component, PropTypes } from 'react';
10+
import React, { Component } from 'react';
11+
import PropTypes from 'prop-types';
1112

1213
function* load(limit) {
1314
let i = 1;

packages/react-scripts/fixtures/kitchensink/src/features/syntax/ObjectDestructuring.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
* of patent rights can be found in the PATENTS file in the same directory.
88
*/
99

10-
import React, { Component, PropTypes } from 'react';
10+
import React, { Component } from 'react';
11+
import PropTypes from 'prop-types';
1112

1213
function load() {
1314
return [

packages/react-scripts/fixtures/kitchensink/src/features/syntax/ObjectSpread.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
* of patent rights can be found in the PATENTS file in the same directory.
88
*/
99

10-
import React, { Component, PropTypes } from 'react';
10+
import React, { Component } from 'react';
11+
import PropTypes from 'prop-types';
1112

1213
function load(baseUser) {
1314
return [

packages/react-scripts/fixtures/kitchensink/src/features/syntax/Promises.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
* of patent rights can be found in the PATENTS file in the same directory.
88
*/
99

10-
import React, { Component, PropTypes } from 'react';
10+
import React, { Component } from 'react';
11+
import PropTypes from 'prop-types';
1112

1213
function load() {
1314
return Promise.resolve([

packages/react-scripts/fixtures/kitchensink/src/features/syntax/RestAndDefault.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
* of patent rights can be found in the PATENTS file in the same directory.
88
*/
99

10-
import React, { Component, PropTypes } from 'react';
10+
import React, { Component } from 'react';
11+
import PropTypes from 'prop-types';
1112

1213
function load({ id, ...rest } = { id: 0, user: { id: 42, name: '42' } }) {
1314
return [

packages/react-scripts/fixtures/kitchensink/src/features/syntax/RestParameters.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
* of patent rights can be found in the PATENTS file in the same directory.
88
*/
99

10-
import React, { Component, PropTypes } from 'react';
10+
import React, { Component } from 'react';
11+
import PropTypes from 'prop-types';
1112

1213
function load({ id = 0, ...rest }) {
1314
return [

packages/react-scripts/fixtures/kitchensink/src/features/syntax/TemplateInterpolation.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
* of patent rights can be found in the PATENTS file in the same directory.
88
*/
99

10-
import React, { Component, PropTypes } from 'react';
10+
import React, { Component } from 'react';
11+
import PropTypes from 'prop-types';
1112

1213
function load(name) {
1314
return [

0 commit comments

Comments
 (0)