Skip to content

Commit

Permalink
Fix lint issues and use single .eslintrc
Browse files Browse the repository at this point in the history
This fixes a few lint issues and also uses a single `.eslintrc` to prevent
duplication and divergence of lint rules.
  • Loading branch information
kassens committed Oct 13, 2015
1 parent e5b0120 commit 6bc16f1
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 351 deletions.
4 changes: 2 additions & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
dist/
docs/
examples/
node_modules/
**/node_modules/
examples/**/updateSchema.js
lib/
scripts/
# TODO: Enable ESLint for website.
Expand Down
3 changes: 3 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ extends:
plugins:
- react

rules:
react/jsx-uses-react: 2

globals:
$Enum: true
$FixMe: true
Expand Down
2 changes: 1 addition & 1 deletion examples/relay-treasurehunt/data/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ var {nodeInterface, nodeField} = nodeDefinitions(
(obj) => {
if (obj instanceof Game) {
return gameType;
} else if (obj instanceof HidingSpot) {
} else if (obj instanceof HidingSpot) {
return hidingSpotType;
} else {
return null;
Expand Down
2 changes: 1 addition & 1 deletion examples/relay-treasurehunt/scripts/updateSchema.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import fs from 'fs';
import path from 'path';
import { schema } from '../data/schema';
import { graphql } from 'graphql';
import { graphql } from 'graphql';
import { introspectionQuery, printSchema } from 'graphql/utilities';

// Save JSON of full schema introspection for Babel Relay Plugin to use
Expand Down
173 changes: 0 additions & 173 deletions examples/star-wars/.eslintrc

This file was deleted.

173 changes: 0 additions & 173 deletions examples/todo/.eslintrc

This file was deleted.

2 changes: 1 addition & 1 deletion src/container/RelayContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,7 @@ function createContainerComponent(
componentName
);
if (!propValue) {
fragmentPointers[fragmentName] = null;;
fragmentPointers[fragmentName] = null;
return;
}
var fragment = getFragment(fragmentName, route, variables);
Expand Down

0 comments on commit 6bc16f1

Please sign in to comment.