Skip to content

Commit b35a894

Browse files
committed
Merge pull request #122 from aaronshaf/eslint-cleanup
eslint cleanup; trailing comma fix for IE
2 parents 154c074 + d420439 commit b35a894

File tree

2 files changed

+23
-5
lines changed

2 files changed

+23
-5
lines changed

eslint.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"env": {
3+
"browser": true,
4+
"node": true
5+
},
6+
"rules": {
7+
"quotes": 0,
8+
"no-comma-dangle": 2,
9+
"no-underscore-dangle": 0,
10+
"curly": 0,
11+
"strict": 0,
12+
"no-use-before-define": 0,
13+
"no-cond-assign": 0,
14+
"consistent-return": 0,
15+
"new-cap": 0,
16+
"no-unused-vars": 0
17+
}
18+
}

modules/components/Route.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
var React = require('react');
22
var warning = require('react/lib/warning');
3-
var invariant = require('react/lib/invariant');
43
var ExecutionEnvironment = require('react/lib/ExecutionEnvironment');
54
var mergeProperties = require('../helpers/mergeProperties');
65
var goBack = require('../helpers/goBack');
@@ -34,7 +33,7 @@ var REF_NAME = '__activeRoute__';
3433
/**
3534
* <Route> components specify components that are rendered to the page when the
3635
* URL matches a given pattern.
37-
*
36+
*
3837
* Routes are arranged in a nested tree structure. When a new URL is requested,
3938
* the tree is searched depth-first to find a route whose path matches the URL.
4039
* When one is found, all routes in the tree that lead to it are considered
@@ -117,7 +116,7 @@ var Route = React.createClass({
117116
location: React.PropTypes.oneOf([ 'hash', 'history' ]).isRequired,
118117
handler: React.PropTypes.any.isRequired,
119118
path: React.PropTypes.string,
120-
name: React.PropTypes.string,
119+
name: React.PropTypes.string
121120
},
122121

123122
getDefaultProps: function () {
@@ -265,6 +264,7 @@ function Redirect(to, params, query) {
265264

266265
function findMatches(path, route) {
267266
var children = route.props.children, matches;
267+
var params;
268268

269269
// Check the subtree first to find the most deeply-nested match.
270270
if (Array.isArray(children)) {
@@ -277,7 +277,7 @@ function findMatches(path, route) {
277277

278278
if (matches) {
279279
var rootParams = getRootMatch(matches).params;
280-
var params = {};
280+
params = {};
281281

282282
Path.extractParamNames(route.props.path).forEach(function (paramName) {
283283
params[paramName] = rootParams[paramName];
@@ -289,7 +289,7 @@ function findMatches(path, route) {
289289
}
290290

291291
// No routes in the subtree matched, so check this route.
292-
var params = Path.extractParams(route.props.path, path);
292+
params = Path.extractParams(route.props.path, path);
293293

294294
if (params)
295295
return [ makeMatch(route, params) ];

0 commit comments

Comments
 (0)