Skip to content

Commit 172b515

Browse files
committed
fix lint issues found by newer eslint
1 parent 8d20080 commit 172b515

File tree

4 files changed

+5
-12
lines changed

4 files changed

+5
-12
lines changed

.eslintrc

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -240,10 +240,7 @@
240240
"int32Hint": false
241241
}
242242
],
243-
"space-return-throw-case": [
244-
2,
245-
"always"
246-
],
243+
"space-return-throw-case": 2,
247244
"space-unary-ops": [
248245
2,
249246
{
@@ -257,6 +254,6 @@
257254
],
258255
"wrap-regex": 0,
259256
"no-var": 0,
260-
"max-len": 80
257+
"max-len": [2, 80, 4]
261258
}
262259
}

src/validator/rules/NoUndefinedVariables.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
* of patent rights can be found in the PATENTS file in the same directory.
99
*/
1010

11-
import type { ValidationContext } from '../index';
1211
import { GraphQLError } from '../../error';
1312
import { FRAGMENT_DEFINITION } from '../../language/kinds';
1413
import {
@@ -23,7 +22,7 @@ import {
2322
* A GraphQL operation is only valid if all variables encountered, both directly
2423
* and via fragment spreads, are defined by that operation.
2524
*/
26-
export default function NoUndefinedVariables(context: ValidationContext): any {
25+
export default function NoUndefinedVariables(): any {
2726
var operation;
2827
var visitedFragmentNames = {};
2928
var definedVariableNames = {};

src/validator/rules/NoUnusedFragments.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
* of patent rights can be found in the PATENTS file in the same directory.
99
*/
1010

11-
import type { ValidationContext } from '../index';
12-
1311
import { GraphQLError } from '../../error';
1412
import { unusedFragMessage } from '../errors';
1513

@@ -19,7 +17,7 @@ import { unusedFragMessage } from '../errors';
1917
* A GraphQL document is only valid if all fragment definitions are spread
2018
* within operations, or spread within other fragments spread within operations.
2119
*/
22-
export default function NoUnusedFragments(context: ValidationContext): any {
20+
export default function NoUnusedFragments(): any {
2321
var fragmentDefs = [];
2422
var spreadsWithinOperation = [];
2523
var fragAdjacencies = {};

src/validator/rules/NoUnusedVariables.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
* of patent rights can be found in the PATENTS file in the same directory.
99
*/
1010

11-
import type { ValidationContext } from '../index';
1211
import { GraphQLError } from '../../error';
1312
import { unusedVariableMessage } from '../errors';
1413

@@ -19,7 +18,7 @@ import { unusedVariableMessage } from '../errors';
1918
* A GraphQL operation is only valid if all variables defined by an operation
2019
* are used, either directly or within a spread fragment.
2120
*/
22-
export default function NoUnusedVariables(context: ValidationContext): any {
21+
export default function NoUnusedVariables(): any {
2322
var visitedFragmentNames = {};
2423
var variableDefs = [];
2524
var variableNameUsed = {};

0 commit comments

Comments
 (0)