Skip to content

eslint cleanup; trailing comma fix for IE #122

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 25, 2014
Merged
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
18 changes: 18 additions & 0 deletions eslint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"env": {
"browser": true,
"node": true
},
"rules": {
"quotes": 0,
"no-comma-dangle": 2,
"no-underscore-dangle": 0,
"curly": 0,
"strict": 0,
"no-use-before-define": 0,
"no-cond-assign": 0,
"consistent-return": 0,
"new-cap": 0,
"no-unused-vars": 0
}
}
10 changes: 5 additions & 5 deletions modules/components/Route.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
var React = require('react');
var warning = require('react/lib/warning');
var invariant = require('react/lib/invariant');
var ExecutionEnvironment = require('react/lib/ExecutionEnvironment');
var mergeProperties = require('../helpers/mergeProperties');
var goBack = require('../helpers/goBack');
Expand Down Expand Up @@ -34,7 +33,7 @@ var REF_NAME = '__activeRoute__';
/**
* <Route> components specify components that are rendered to the page when the
* URL matches a given pattern.
*
*
* Routes are arranged in a nested tree structure. When a new URL is requested,
* the tree is searched depth-first to find a route whose path matches the URL.
* When one is found, all routes in the tree that lead to it are considered
Expand Down Expand Up @@ -117,7 +116,7 @@ var Route = React.createClass({
location: React.PropTypes.oneOf([ 'hash', 'history' ]).isRequired,
handler: React.PropTypes.any.isRequired,
path: React.PropTypes.string,
name: React.PropTypes.string,
name: React.PropTypes.string
},

getDefaultProps: function () {
Expand Down Expand Up @@ -265,6 +264,7 @@ function Redirect(to, params, query) {

function findMatches(path, route) {
var children = route.props.children, matches;
var params;

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

if (matches) {
var rootParams = getRootMatch(matches).params;
var params = {};
params = {};

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

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

if (params)
return [ makeMatch(route, params) ];
Expand Down