Skip to content

Commit

Permalink
Use prop-types package (facebook#2029)
Browse files Browse the repository at this point in the history
  • Loading branch information
Timer authored Apr 25, 2017
1 parent 9f4261e commit 5dbf30f
Show file tree
Hide file tree
Showing 18 changed files with 35 additions and 17 deletions.
1 change: 1 addition & 0 deletions fixtures/kitchensink/.template.dependencies.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
3 changes: 2 additions & 1 deletion fixtures/kitchensink/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
3 changes: 2 additions & 1 deletion fixtures/kitchensink/src/features/env/NodePath.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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']];
Expand Down
3 changes: 2 additions & 1 deletion fixtures/kitchensink/src/features/syntax/ArraySpread.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 [
Expand Down
3 changes: 2 additions & 1 deletion fixtures/kitchensink/src/features/syntax/AsyncAwait.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 [
Expand Down
3 changes: 2 additions & 1 deletion fixtures/kitchensink/src/features/syntax/ClassProperties.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 2 additions & 1 deletion fixtures/kitchensink/src/features/syntax/Generators.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 [
Expand Down
3 changes: 2 additions & 1 deletion fixtures/kitchensink/src/features/syntax/ObjectSpread.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 [
Expand Down
3 changes: 2 additions & 1 deletion fixtures/kitchensink/src/features/syntax/Promises.js
Original file line number Diff line number Diff line change
Expand Up @@ -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([
Expand Down
3 changes: 2 additions & 1 deletion fixtures/kitchensink/src/features/syntax/RestAndDefault.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 [
Expand Down
3 changes: 2 additions & 1 deletion fixtures/kitchensink/src/features/syntax/RestParameters.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 [
Expand Down

0 comments on commit 5dbf30f

Please sign in to comment.