Skip to content

Commit

Permalink
Fix prop-type warnings (firefox-devtools#4257)
Browse files Browse the repository at this point in the history
* Add separate prop-types dependency

Using prop types from the React repo has been deprecated.

* Alphabetize dependencies and remove duplicates
  • Loading branch information
ahuth authored and amitzur committed Oct 5, 2017
1 parent 5e1eab7 commit cf264db
Show file tree
Hide file tree
Showing 25 changed files with 51 additions and 30 deletions.
10 changes: 4 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@
"devtools-components": "^0.0.2",
"devtools-launchpad": "^0.0.100",
"devtools-linters": "^0.0.3",
"devtools-reps": "^0.12.3",
"devtools-map-bindings": "^0.2.0",
"devtools-reps": "^0.12.3",
"devtools-source-editor": "0.0.6",
"devtools-source-map": "^0.14.2",
"devtools-splitter": "^0.0.3",
Expand All @@ -85,6 +85,7 @@
"md5": "^2.2.1",
"parse-script-tags": "^0.1.1",
"pretty-fast": "^0.2.2",
"prop-types": "^15.6.0",
"react": "^15.6.2",
"react-dom": "^15.6.2",
"react-immutable-proptypes": "^2.1.0",
Expand Down Expand Up @@ -113,14 +114,11 @@
"enzyme": "^2.9.1",
"eslint": "^4.2.0",
"eslint-config-prettier": "^2.3.0",
"eslint-plugin-babel": "^3.3.0",
"eslint-plugin-flowtype": "^2.20.0",
"eslint-plugin-mozilla": "0.4.3",
"eslint-plugin-prettier": "^2.3.1",
"eslint-plugin-react": "^7.2.1",
"eslint-plugin-babel": "^4.1.2",
"eslint-plugin-flowtype": "^2.36.0",
"eslint-plugin-mozilla": "^0.4.4",
"eslint-plugin-prettier": "^2.3.1",
"eslint-plugin-react": "^7.2.1",
"expect.js": "^0.3.1",
"flow-bin": "^0.52.0",
"glob": "^7.0.3",
Expand Down
3 changes: 2 additions & 1 deletion src/components/App.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// @flow

import React, { PropTypes, Component } from "react";
import PropTypes from "prop-types";
import React, { Component } from "react";
import { connect } from "react-redux";
import { bindActionCreators } from "redux";
import { features } from "../utils/prefs";
Expand Down
3 changes: 2 additions & 1 deletion src/components/Editor/SearchBar.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// @flow

import React, { Component, PropTypes } from "react";
import PropTypes from "prop-types";
import React, { Component } from "react";
import { findDOMNode } from "react-dom";
import { connect } from "react-redux";
import { bindActionCreators } from "redux";
Expand Down
3 changes: 2 additions & 1 deletion src/components/Editor/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// @flow
import React, { PropTypes, PureComponent } from "react";
import PropTypes from "prop-types";
import React, { PureComponent } from "react";
import ReactDOM from "react-dom";
import ImPropTypes from "react-immutable-proptypes";
import { bindActionCreators } from "redux";
Expand Down
3 changes: 2 additions & 1 deletion src/components/PrimaryPanes/SourcesTree.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

import { bindActionCreators } from "redux";
import { connect } from "react-redux";
import React, { PropTypes, Component } from "react";
import PropTypes from "prop-types";
import React, { Component } from "react";
import classnames from "classnames";
import ImPropTypes from "react-immutable-proptypes";
import { Set } from "immutable";
Expand Down
3 changes: 2 additions & 1 deletion src/components/ProjectSearch/SourceSearch.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { Component, PropTypes } from "react";
import PropTypes from "prop-types";
import React, { Component } from "react";

import { isPretty, getSourcePath, isThirdParty } from "../../utils/source";
import { endTruncateStr } from "../../utils/utils";
Expand Down
3 changes: 2 additions & 1 deletion src/components/ProjectSearch/TextSearch.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { Component, PropTypes } from "react";
import PropTypes from "prop-types";
import React, { Component } from "react";
import classnames from "classnames";

import Svg from "../shared/Svg";
Expand Down
3 changes: 2 additions & 1 deletion src/components/ProjectSearch/ToggleSearch.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { Component, PropTypes } from "react";
import PropTypes from "prop-types";
import React, { Component } from "react";
import classnames from "classnames";

export default class ToggleSearch extends Component {
Expand Down
3 changes: 2 additions & 1 deletion src/components/ProjectSearch/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// @flow

import React, { PropTypes, Component } from "react";
import PropTypes from "prop-types";
import React, { Component } from "react";
import { connect } from "react-redux";
import { bindActionCreators } from "redux";
import actions from "../../actions";
Expand Down
3 changes: 2 additions & 1 deletion src/components/SecondaryPanes/CommandBar.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// @flow
import React, { Component, PropTypes } from "react";
import PropTypes from "prop-types";
import React, { Component } from "react";
import { connect } from "react-redux";
import { bindActionCreators } from "redux";
import classnames from "classnames";
Expand Down
3 changes: 2 additions & 1 deletion src/components/SecondaryPanes/Frames/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// @flow

import React, { PropTypes, Component, createFactory } from "react";
import PropTypes from "prop-types";
import React, { Component, createFactory } from "react";
import { bindActionCreators } from "redux";
import { connect } from "react-redux";
import { createSelector } from "reselect";
Expand Down
3 changes: 2 additions & 1 deletion src/components/SecondaryPanes/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// @flow
import React, { PropTypes, Component } from "react";
import PropTypes from "prop-types";
import React, { Component } from "react";
import { connect } from "react-redux";
import { bindActionCreators } from "redux";
import { features } from "../../utils/prefs";
Expand Down
3 changes: 2 additions & 1 deletion src/components/SymbolModal.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// @flow

import React, { Component, PropTypes } from "react";
import PropTypes from "prop-types";
import React, { Component } from "react";
import { connect } from "react-redux";
import { bindActionCreators } from "redux";
import { filter } from "fuzzaldrin-plus";
Expand Down
3 changes: 2 additions & 1 deletion src/components/shared/Modal.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// @flow

import React, { PropTypes, Component } from "react";
import PropTypes from "prop-types";
import React, { Component } from "react";
import type { Children } from "react";
import classnames from "classnames";
import Transition from "react-transition-group/Transition";
Expand Down
3 changes: 2 additions & 1 deletion src/components/stories/ManagedTree.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { PropTypes } from "react";
import PropTypes from "prop-types";
import React from "react";
import { storiesOf } from "@storybook/react";
import ManagedTree from "../shared/ManagedTree";
import { L10N } from "devtools-launchpad";
Expand Down
3 changes: 2 additions & 1 deletion src/components/stories/Outline.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { PropTypes } from "react";
import PropTypes from "prop-types";
import React from "react";
import { storiesOf } from "@storybook/react";
import { action } from "@storybook/addon-actions";

Expand Down
3 changes: 2 additions & 1 deletion src/components/stories/Preview.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { PropTypes } from "react";
import PropTypes from "prop-types";
import React from "react";
import { storiesOf } from "@storybook/react";
import { action } from "@storybook/addon-actions";

Expand Down
3 changes: 2 additions & 1 deletion src/components/stories/ResultList.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { PropTypes } from "react";
import PropTypes from "prop-types";
import React from "react";
import { storiesOf } from "@storybook/react";
import { action } from "@storybook/addon-actions";

Expand Down
3 changes: 2 additions & 1 deletion src/components/stories/SearchInput.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { PropTypes } from "react";
import PropTypes from "prop-types";
import React from "react";
import { storiesOf } from "@storybook/react";
import { action } from "@storybook/addon-actions";

Expand Down
3 changes: 2 additions & 1 deletion src/components/stories/TextSearch.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { PropTypes } from "react";
import PropTypes from "prop-types";
import React from "react";
import { storiesOf } from "@storybook/react";
import { L10N } from "devtools-launchpad";

Expand Down
3 changes: 2 additions & 1 deletion src/components/stories/Workers.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { PropTypes } from "react";
import PropTypes from "prop-types";
import React from "react";
import { storiesOf } from "@storybook/react";
import { Workers } from "../SecondaryPanes/Workers";
import { L10N } from "devtools-launchpad";
Expand Down
3 changes: 2 additions & 1 deletion src/components/stories/frames.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { PropTypes } from "react";
import PropTypes from "prop-types";
import React from "react";
import classnames from "classnames";
import { storiesOf } from "@storybook/react";
import { action } from "@storybook/addon-actions";
Expand Down
3 changes: 2 additions & 1 deletion src/components/stories/helpers/shortcuts.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { PropTypes, Component } from "react";
import PropTypes from "prop-types";
import { Component } from "react";

import { KeyShortcuts } from "devtools-modules";
const shortcuts = new KeyShortcuts({ window });
Expand Down
3 changes: 2 additions & 1 deletion src/components/stories/tabs.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { PropTypes } from "react";
import PropTypes from "prop-types";
import React from "react";
import { storiesOf } from "@storybook/react";
import { action } from "@storybook/addon-actions";

Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7700,7 +7700,7 @@ [email protected]:
dependencies:
fbjs "^0.8.9"

prop-types@^15.5.10, prop-types@^15.5.4, prop-types@^15.5.6, prop-types@^15.5.8, prop-types@^15.5.9:
prop-types@^15.5.10, prop-types@^15.5.4, prop-types@^15.5.6, prop-types@^15.5.8, prop-types@^15.5.9, prop-types@^15.6.0:
version "15.6.0"
resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.6.0.tgz#ceaf083022fc46b4a35f69e13ef75aed0d639856"
dependencies:
Expand Down

0 comments on commit cf264db

Please sign in to comment.