Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import StaticRouter from 'react-router/StaticRouter'

describe('renderRoutes', () => {
let rendered
const Comp = ({ match, route, route: { routes } }) => (
const Comp = ({ route, route: { routes } }) => (
rendered.push(route),
renderRoutes(routes)
)
Expand Down Expand Up @@ -37,7 +37,7 @@ describe('renderRoutes', () => {
path: '/'
}
const routes = [routeToMatch, {
component: Comp,
component: Comp
}]

renderToString(
Expand All @@ -52,7 +52,7 @@ describe('renderRoutes', () => {
it('renders the first matched route in nested routes', () => {
const childRouteToMatch = {
component: Comp,
path: '/',
path: '/'
}
const routeToMatch = {
component: Comp,
Expand All @@ -62,7 +62,7 @@ describe('renderRoutes', () => {
}]
}
const routes = [routeToMatch, {
component: Comp,
component: Comp
}]

renderToString(
Expand Down
3 changes: 2 additions & 1 deletion packages/react-router-dom/modules/BrowserRouter.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { PropTypes } from 'react'
import React from 'react'
import PropTypes from 'prop-types'
import createHistory from 'history/createBrowserHistory'
import { Router } from 'react-router'

Expand Down
3 changes: 2 additions & 1 deletion packages/react-router-dom/modules/HashRouter.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { PropTypes } from 'react'
import React from 'react'
import PropTypes from 'prop-types'
import createHistory from 'history/createHashHistory'
import { Router } from 'react-router'

Expand Down
3 changes: 2 additions & 1 deletion packages/react-router-dom/modules/Link.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { PropTypes } from 'react'
import React from 'react'
import PropTypes from 'prop-types'

const isModifiedEvent = (event) =>
!!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey)
Expand Down
3 changes: 2 additions & 1 deletion packages/react-router-dom/modules/NavLink.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { PropTypes } from 'react'
import React from 'react'
import PropTypes from 'prop-types'
import { Route } from 'react-router'
import Link from './Link'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import expect from 'expect'
import React, { PropTypes } from 'react'
import React from 'react'
import PropTypes from 'prop-types'
import ReactDOM from 'react-dom'
import BrowserRouter from '../BrowserRouter'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import expect from 'expect'
import React, { PropTypes } from 'react'
import React from 'react'
import PropTypes from 'prop-types'
import ReactDOM from 'react-dom'
import HashRouter from '../HashRouter'

Expand Down
2 changes: 2 additions & 0 deletions packages/react-router-dom/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"test": "karma start --single-run"
},
"peerDependencies": {
"prop-types": "^15",
"react": "^15"
},
"dependencies": {
Expand Down Expand Up @@ -68,6 +69,7 @@
"karma-webpack": "^1.7.0",
"mocha": "^2.5.3",
"pretty-bytes": "^3.0.1",
"prop-types": "^15.5.4",
"react": "^15.4.2",
"react-addons-test-utils": "^15.4.2",
"react-dom": "^15.3.0",
Expand Down
3 changes: 2 additions & 1 deletion packages/react-router-native/AndroidBackButton.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react'
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { BackAndroid } from 'react-native'

class AndroidBackButton extends Component {
Expand Down
3 changes: 2 additions & 1 deletion packages/react-router-native/DeepLinking.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react'
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { Linking } from 'react-native'

const regex = /.*?:\/\//g
Expand Down
3 changes: 2 additions & 1 deletion packages/react-router-native/Link.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react'
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { TouchableHighlight } from 'react-native'

class Link extends Component {
Expand Down
3 changes: 2 additions & 1 deletion packages/react-router-native/NativeRouter.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { PropTypes } from 'react'
import React from 'react'
import PropTypes from 'prop-types'
import MemoryRouter from 'react-router/MemoryRouter'
import { Alert } from 'react-native'

Expand Down
3 changes: 2 additions & 1 deletion packages/react-router-native/examples/ExperimentalExample.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react'
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import {
Text,
View,
Expand Down
3 changes: 2 additions & 1 deletion packages/react-router-native/experimental/StackRoute.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
// Any help cleaning it up would be appreciated.
// <3 <3 <3 - Ryan

import React, { Component, PropTypes } from 'react'
import React, { Component } from 'react'
import PropTypes from 'prop-types'

import {
Text,
Expand Down
2 changes: 2 additions & 0 deletions packages/react-router-native/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"experimental/TabRoutes.js"
],
"peerDependencies": {
"prop-types": "^15",
"react": "^15",
"react-native": ">=0.40"
},
Expand All @@ -25,6 +26,7 @@
"babel-jest": "18.0.0",
"babel-preset-react-native": "1.9.1",
"jest": "18.1.0",
"prop-types": "^15.5.4",
"react": "15.4.1",
"react-native": "0.42.0",
"react-test-renderer": "~15.4.0-rc.4"
Expand Down
3 changes: 2 additions & 1 deletion packages/react-router-redux/modules/ConnectedRouter.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react'
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { Router } from 'react-router'

import { LOCATION_CHANGE } from './reducer'
Expand Down
2 changes: 2 additions & 0 deletions packages/react-router-redux/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"test": "jest"
},
"peerDependencies": {
"prop-types": "^15",
"react": "^15"
},
"dependencies": {
Expand All @@ -50,6 +51,7 @@
"in-publish": "^2.0.0",
"jest": "^19.0.2",
"pretty-bytes": "^4.0.2",
"prop-types": "^15.5.4",
"react": "^15.4.2",
"react-dom": "^15.4.2",
"react-redux": "^5.0.3",
Expand Down
2 changes: 2 additions & 0 deletions packages/react-router-redux/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@ var config = {
],
external: [
'react',
'prop-types',
'react-router'
],
globals: {
react: 'React',
'prop-types': 'PropTypes',
'react-router': 'ReactRouter'
}
}
Expand Down
3 changes: 2 additions & 1 deletion packages/react-router-website/modules/components/API.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react'
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { Redirect } from 'react-router-dom'
import { Block } from 'jsxstyle'
import ScrollToDoc from './ScrollToDoc'
Expand Down
3 changes: 2 additions & 1 deletion packages/react-router-website/modules/components/APISmall.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react'
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { Redirect, Route } from 'react-router-dom'
import { Block } from 'jsxstyle'
import ScrollToDoc from './ScrollToDoc'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Component, PropTypes } from 'react'
import { Component } from 'react'
import PropTypes from 'prop-types'
import { withRouter } from 'react-router-dom'

let delegate = (history) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react'
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import EnvironmentLarge from './EnvironmentLarge'
import EnvironmentSmall from './EnvironmentSmall'
import Bundle from './Bundle'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { PropTypes } from 'react'
import React from 'react'
import PropTypes from 'prop-types'
import { Block, Row, Inline, Col } from 'jsxstyle'
import { Link, Route } from 'react-router-dom'
import { LIGHT_GRAY, RED } from '../Theme'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react'
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { Block, InlineBlock } from 'jsxstyle'
import { Link, Route, Redirect, Switch } from 'react-router-dom'
import { LIGHT_GRAY, RED } from '../Theme'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react'
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { Block, Col } from 'jsxstyle'
import EnvironmentHeader from './EnvironmentHeader'
import { Link, Switch, Route } from 'react-router-dom'
Expand Down
3 changes: 2 additions & 1 deletion packages/react-router-website/modules/components/Example.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react'
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import WebExample from './WebExample'
import NativeExample from './NativeExample'
import { Redirect } from 'react-router-dom'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { PropTypes } from 'react'
import React from 'react'
import PropTypes from 'prop-types'
import { MemoryRouter, Route } from 'react-router-dom'
import { Block, Col, Row } from 'jsxstyle'
import { LIGHT_GRAY, GRAY } from '../Theme'
Expand Down
3 changes: 2 additions & 1 deletion packages/react-router-website/modules/components/Guide.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { PropTypes } from 'react'
import React from 'react'
import PropTypes from 'prop-types'
import { Redirect, Route } from 'react-router-dom'
import { Block } from 'jsxstyle'
import ScrollToDoc from './ScrollToDoc'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*eslint react/no-danger:0 */
import React from 'react'
import PropTypes from 'prop-types'
import 'prismjs/themes/prism-tomorrow.css'

const MarkdownViewer = ({ html, id }) => (
Expand All @@ -11,7 +12,7 @@ const MarkdownViewer = ({ html, id }) => (
)

MarkdownViewer.propTypes = {
html: React.PropTypes.string.isRequired
html: PropTypes.string.isRequired
}

export default MarkdownViewer
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { PropTypes } from 'react'
import React from 'react'
import PropTypes from 'prop-types'
import Media from 'react-media'
import { Block, Col } from 'jsxstyle'
import Bundle from './Bundle'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { PropTypes, Component } from 'react'
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { Block, Flex } from 'jsxstyle'
import { RED } from '../Theme'
import SmallScreen from './SmallScreen'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Thanks @iammerrick! <3 <3 <3

import React, { Component, PropTypes } from 'react'
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { findDOMNode } from 'react-dom'

const getPointRelativeToElement = (point, element) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { PropTypes, Component } from 'react'
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { Motion, spring } from 'react-motion'

class ScrollY extends Component {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*eslint-disable react/no-danger*/
import React from 'react'
import PropTypes from 'prop-types'
import 'prismjs/themes/prism-tomorrow.css'
import { Block } from 'jsxstyle'

Expand All @@ -17,7 +18,7 @@ const SourceViewer = ({ code, ...rest }) => (
)

SourceViewer.propTypes = {
code: React.PropTypes.string.isRequired
code: PropTypes.string.isRequired
}

export default SourceViewer
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { PropTypes } from 'react'
import React from 'react'
import PropTypes from 'prop-types'
import Media from 'react-media'
import { Block } from 'jsxstyle'
import { Route } from 'react-router-dom'
Expand Down
2 changes: 1 addition & 1 deletion packages/react-router-website/modules/examples/Auth.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { PropTypes } from 'react'
import React from 'react'
import {
BrowserRouter as Router,
Route,
Expand Down
1 change: 1 addition & 0 deletions packages/react-router-website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"markdown-it-anchor": "^3.0.0",
"postcss-loader": "0.9.1",
"prismjs-loader": "0.0.3",
"prop-types": "^15.5.4",
"react": "^15.4.0",
"react-addons-css-transition-group": "^15.4.2",
"react-dom": "^15.4.0",
Expand Down
1 change: 1 addition & 0 deletions packages/react-router/modules/.eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"plugin:react/recommended"
],
"rules": {
"no-unused-vars": [ 2, { "ignoreRestSiblings": true }],
"prefer-arrow-callback": 2,
"react/display-name": 0,
"semi": [ 2, "never" ]
Expand Down
3 changes: 2 additions & 1 deletion packages/react-router/modules/MemoryRouter.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { PropTypes } from 'react'
import React from 'react'
import PropTypes from 'prop-types'
import createHistory from 'history/createMemoryHistory'
import Router from './Router'

Expand Down
3 changes: 2 additions & 1 deletion packages/react-router/modules/Prompt.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { PropTypes } from 'react'
import React from 'react'
import PropTypes from 'prop-types'

/**
* The public API for prompting the user before navigating away
Expand Down
3 changes: 2 additions & 1 deletion packages/react-router/modules/Redirect.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { PropTypes } from 'react'
import React from 'react'
import PropTypes from 'prop-types'

/**
* The public API for updating the location programatically
Expand Down
4 changes: 2 additions & 2 deletions packages/react-router/modules/Route.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import warning from 'warning'
import React, { PropTypes } from 'react'
import React from 'react'
import PropTypes from 'prop-types'
import matchPath from './matchPath'

/**
Expand Down Expand Up @@ -33,7 +34,6 @@ class Route extends React.Component {
}

getChildContext() {
const { router } = this.context
return {
router: {
...this.context.router,
Expand Down
3 changes: 2 additions & 1 deletion packages/react-router/modules/Router.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import warning from 'warning'
import invariant from 'invariant'
import React, { PropTypes } from 'react'
import React from 'react'
import PropTypes from 'prop-types'

/**
* The public API for putting history on context.
Expand Down
Loading