Skip to content
This repository was archived by the owner on Mar 20, 2023. It is now read-only.

Update eslint config #81

Merged
merged 1 commit into from
May 26, 2016
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: 9 additions & 9 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,11 @@

"rules": {
"babel/arrow-parens": [2, "as-needed"],
"babel/array-bracket-spacing": [2, "always"],
"babel/generator-star-spacing": [2, {"before": true, "after": false}],
"array-bracket-spacing": 0,
"generator-star-spacing": 0,

"array-bracket-spacing": [2, "always", {"arraysInArrays": false}],
"arrow-spacing": 2,
"block-scoped-var": 0,
"brace-style": [2, "1tbs", {"allowSingleLine": true}],
Expand All @@ -61,14 +64,14 @@
"eqeqeq": 2,
"func-names": 0,
"func-style": 0,
"generator-star-spacing": [2, {"before": true, "after": false}],
"guard-for-in": 2,
"handle-callback-err": [2, "error"],
"id-length": 0,
"id-match": [2, "^(?:_?[a-zA-Z0-9]*)|[_A-Z0-9]+$"],
"indent": [2, 2, {"SwitchCase": 1}],
"init-declarations": 0,
"key-spacing": [2, {"beforeColon": false, "afterColon": true}],
"keyword-spacing": 2,
"linebreak-style": 2,
"lines-around-comment": 0,
"max-depth": 0,
Expand Down Expand Up @@ -100,7 +103,6 @@
"no-else-return": 2,
"no-empty": 2,
"no-empty-character-class": 2,
"no-empty-label": 2,
"no-eq-null": 0,
"no-eval": 2,
"no-ex-assign": 2,
Expand All @@ -121,7 +123,7 @@
"no-irregular-whitespace": 2,
"no-iterator": 2,
"no-label-var": 2,
"no-labels": 0,
"no-labels": [2, {"allowLoop": true}],
"no-lone-blocks": 2,
"no-lonely-if": 2,
"no-loop-func": 0,
Expand Down Expand Up @@ -174,17 +176,17 @@
"no-unused-vars": [2, {"vars": "all", "args": "after-used"}],
"no-use-before-define": 0,
"no-useless-call": 2,
"no-var": 0,
"no-var": 2,
"no-void": 2,
"no-warning-comments": 0,
"no-with": 2,
"object-curly-spacing": [2, "always"],
"object-curly-spacing": [0, "always"],
"object-shorthand": [2, "always"],
"one-var": [2, "never"],
"operator-assignment": [2, "always"],
"operator-linebreak": [2, "after"],
"padded-blocks": 0,
"prefer-const": 0,
"prefer-const": 2,
"prefer-reflect": 0,
"prefer-spread": 0,
"quote-props": [2, "as-needed"],
Expand All @@ -194,12 +196,10 @@
"semi": [2, "always"],
"semi-spacing": [2, {"before": false, "after": true}],
"sort-vars": 0,
"space-after-keywords": [2, "always"],
"space-before-blocks": [2, "always"],
"space-before-function-paren": [2, {"anonymous": "always", "named": "never"}],
"space-in-parens": 0,
"space-infix-ops": [2, {"int32Hint": false}],
"space-return-throw-case": 2,
"space-unary-ops": [2, {"words": true, "nonwords": false}],
"spaced-comment": [2, "always"],
"strict": 0,
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@
"devDependencies": {
"babel": "5.8.21",
"babel-core": "5.8.22",
"babel-eslint": "4.1.8",
"babel-eslint": "6.0.3",
"babel-runtime": "5.8.20",
"body-parser": "^1.14.0",
"chai": "3.2.0",
"coveralls": "2.11.4",
"eslint": "1.1.0",
"eslint-plugin-babel": "2.1.1",
"eslint": "2.8.0",
"eslint-plugin-babel": "3.2.0",
"express": "4.13.3",
"express3": "*",
"flow-bin": "0.21.0",
Expand Down
4 changes: 2 additions & 2 deletions src/__tests__/http-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ describe('test harness', () => {

});

[[ express4, 'modern' ], [ express3, 'old' ]].forEach(([ express, version ]) => {
[ [ express4, 'modern' ], [ express3, 'old' ] ].forEach(([ express, version ]) => {
describe(`GraphQL-HTTP tests for ${version} mocha`, () => {
describe('GET functionality', () => {
it('allows GET with query param', async () => {
Expand Down Expand Up @@ -207,7 +207,7 @@ describe('test harness', () => {
const error = await catchError(
request(app)
.get(urlString({
query: `{ test, unknownOne, unknownTwo }`
query: '{ test, unknownOne, unknownTwo }'
}))
);

Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ export default function graphqlHTTP(options: Options): Middleware {
throw httpError(
405,
`Can only perform a ${operationAST.operation} operation ` +
`from a POST request.`
'from a POST request.'
);
}
}
Expand Down