Skip to content

Commit

Permalink
Update all dependencies, include flow-specific lint handling
Browse files Browse the repository at this point in the history
  • Loading branch information
leebyron committed Jun 10, 2016
1 parent 0618077 commit 572bbda
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 20 deletions.
11 changes: 9 additions & 2 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
"parser": "babel-eslint",

"plugins": [
"babel"
"babel",
"flowtype",
"flow-vars"
],

"env": {
Expand Down Expand Up @@ -44,6 +46,11 @@
"array-bracket-spacing": 0,
"generator-star-spacing": 0,

"flowtype/space-after-type-colon": [2, "always"],
"flowtype/space-before-type-colon": [2, "never"],
"flow-vars/define-flow-type": 2,
"flow-vars/use-flow-type": 2,

"arrow-spacing": 2,
"block-scoped-var": 0,
"brace-style": [2, "1tbs", {"allowSingleLine": true}],
Expand Down Expand Up @@ -155,7 +162,7 @@
"no-return-assign": 2,
"no-script-url": 2,
"no-self-compare": 0,
"no-sequences": 2,
"no-sequences": 0,
"no-shadow": 2,
"no-shadow-restricted-names": 2,
"no-spaced-func": 2,
Expand Down
24 changes: 13 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,23 +38,25 @@
"babel-runtime": ">=6.0.0"
},
"devDependencies": {
"babel-cli": "6.6.5",
"babel-eslint": "6.0.2",
"babel-plugin-syntax-async-functions": "6.5.0",
"babel-plugin-transform-class-properties": "6.6.0",
"babel-plugin-transform-flow-strip-types": "6.7.0",
"babel-plugin-transform-object-rest-spread": "6.6.5",
"babel-plugin-transform-regenerator": "6.6.5",
"babel-plugin-transform-runtime": "6.6.0",
"babel-cli": "6.9.0",
"babel-eslint": "6.0.4",
"babel-plugin-syntax-async-functions": "6.8.0",
"babel-plugin-transform-class-properties": "6.9.1",
"babel-plugin-transform-flow-strip-types": "6.8.0",
"babel-plugin-transform-object-rest-spread": "6.8.0",
"babel-plugin-transform-regenerator": "6.9.0",
"babel-plugin-transform-runtime": "6.9.0",
"babel-preset-es2015": "6.6.0",
"chai": "3.5.0",
"chai-subset": "1.2.2",
"coveralls": "2.11.9",
"eslint": "2.7.0",
"eslint": "2.11.1",
"eslint-plugin-babel": "3.2.0",
"flow-bin": "0.22.1",
"eslint-plugin-flow-vars": "^0.4.0",
"eslint-plugin-flowtype": "2.2.7",
"flow-bin": "0.26.0",
"isparta": "4.0.0",
"mocha": "2.4.5",
"mocha": "2.5.3",
"sane": "1.3.4"
}
}
7 changes: 2 additions & 5 deletions src/language/lexer.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,22 +193,19 @@ function readToken(source: Source, fromPosition: number): Token {
case 124: return makeToken(TokenKind.PIPE, position, position + 1);
// }
case 125: return makeToken(TokenKind.BRACE_R, position, position + 1);
// A-Z
// A-Z _ a-z
case 65: case 66: case 67: case 68: case 69: case 70: case 71: case 72:
case 73: case 74: case 75: case 76: case 77: case 78: case 79: case 80:
case 81: case 82: case 83: case 84: case 85: case 86: case 87: case 88:
case 89: case 90:
// _
case 95:
// a-z
case 97: case 98: case 99: case 100: case 101: case 102: case 103: case 104:
case 105: case 106: case 107: case 108: case 109: case 110: case 111:
case 112: case 113: case 114: case 115: case 116: case 117: case 118:
case 119: case 120: case 121: case 122:
return readName(source, position);
// -
// - 0-9
case 45:
// 0-9
case 48: case 49: case 50: case 51: case 52:
case 53: case 54: case 55: case 56: case 57:
return readNumber(source, position, code);
Expand Down
5 changes: 3 additions & 2 deletions src/language/parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,10 +204,11 @@ function parseDefinition(parser: Parser): Definition {

if (peek(parser, TokenKind.NAME)) {
switch (parser.token.value) {
// Note: subscription is an experimental non-spec addition.
case 'query':
case 'mutation':
// Note: subscription is an experimental non-spec addition.
case 'subscription': return parseOperationDefinition(parser);
case 'subscription':
return parseOperationDefinition(parser);

case 'fragment': return parseFragmentDefinition(parser);

Expand Down

0 comments on commit 572bbda

Please sign in to comment.