Skip to content

Commit

Permalink
Remove eslint comments unnecessary after 40f73fd
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanGoncharov committed Dec 14, 2017
1 parent 461392d commit 8d1ae25
Show file tree
Hide file tree
Showing 14 changed files with 79 additions and 112 deletions.
3 changes: 0 additions & 3 deletions src/__tests__/starWarsIntrospection-test.js
Expand Up @@ -12,9 +12,6 @@ import { describe, it } from 'mocha';
import { StarWarsSchema } from './starWarsSchema.js';
import { graphql } from '../graphql';

// 80+ char lines are useful in describe/it, so ignore in this file.
/* eslint-disable max-len */

describe('Star Wars Introspection Tests', () => {
describe('Basic Introspection', () => {
it('Allows querying the schema for types', async () => {
Expand Down
3 changes: 0 additions & 3 deletions src/__tests__/starWarsQuery-test.js
Expand Up @@ -12,9 +12,6 @@ import { describe, it } from 'mocha';
import { StarWarsSchema } from './starWarsSchema.js';
import { graphql } from '../graphql';

// 80+ char lines are useful in describe/it, so ignore in this file.
/* eslint-disable max-len */

describe('Star Wars Query Tests', () => {
describe('Basic Queries', () => {
it('Correctly identifies R2-D2 as the hero of the Star Wars Saga', async () => {
Expand Down
3 changes: 1 addition & 2 deletions src/execution/__tests__/executor-test.js
Expand Up @@ -393,9 +393,8 @@ describe('Execute: Handles basic execution tasks', () => {
throw new Error('Error getting syncError');
},
syncRawError() {
/* eslint-disable */
// eslint-disable-next-line no-throw-literal
throw 'Error getting syncRawError';
/* eslint-enable */
},
syncReturnError() {
return new Error('Error getting syncReturnError');
Expand Down
3 changes: 0 additions & 3 deletions src/execution/__tests__/lists-test.js
Expand Up @@ -5,9 +5,6 @@
* LICENSE file in the root directory of this source tree.
*/

// 80+ char lines are useful in describe/it, so ignore in this file.
/* eslint-disable max-len */

import { expect } from 'chai';
import { describe, it } from 'mocha';
import { formatError } from '../../error';
Expand Down
3 changes: 0 additions & 3 deletions src/execution/__tests__/mutations-test.js
Expand Up @@ -5,9 +5,6 @@
* LICENSE file in the root directory of this source tree.
*/

// 80+ char lines are useful in describe/it, so ignore in this file.
/* eslint-disable max-len */

import { expect } from 'chai';
import { describe, it } from 'mocha';
import { execute } from '../execute';
Expand Down
3 changes: 0 additions & 3 deletions src/execution/__tests__/nonnull-test.js
Expand Up @@ -5,9 +5,6 @@
* LICENSE file in the root directory of this source tree.
*/

// 80+ char lines are useful in describe/it, so ignore in this file.
/* eslint-disable max-len */

import { expect } from 'chai';
import { describe, it } from 'mocha';
import { execute } from '../execute';
Expand Down
3 changes: 0 additions & 3 deletions src/execution/__tests__/variables-test.js
Expand Up @@ -5,9 +5,6 @@
* LICENSE file in the root directory of this source tree.
*/

// 80+ char lines are useful in describe/it, so ignore in this file.
/* eslint-disable max-len */

import { expect } from 'chai';
import { describe, it } from 'mocha';
import { execute } from '../execute';
Expand Down
2 changes: 0 additions & 2 deletions src/language/__tests__/lexer-test.js
Expand Up @@ -25,8 +25,6 @@ function expectSyntaxError(text, message, location) {
}
}

/* eslint-disable max-len */

describe('Lexer', () => {
it('disallows uncommon control characters', () => {
expectSyntaxError(
Expand Down
155 changes: 77 additions & 78 deletions src/language/__tests__/schema-printer-test.js
Expand Up @@ -11,6 +11,7 @@ import { readFileSync } from 'fs';
import { join } from 'path';
import { parse } from '../parser';
import { print } from '../printer';
import dedent from '../../jsutils/dedent';

describe('Printer', () => {
it('prints minimal ast', () => {
Expand Down Expand Up @@ -45,115 +46,113 @@ describe('Printer', () => {

const printed = print(ast);

/* eslint-disable max-len */
expect(printed).to.equal(
`schema {
query: QueryType
mutation: MutationType
}
expect(printed).to.equal(dedent`
schema {
query: QueryType
mutation: MutationType
}
"""
This is a description
of the \`Foo\` type.
"""
type Foo implements Bar {
one: Type
two(argument: InputType!): Type
three(argument: InputType, other: String): Int
four(argument: String = "string"): String
five(argument: [String] = ["string", "string"]): String
six(argument: InputType = {key: "value"}): Type
seven(argument: Int = null): Type
}
"""
This is a description
of the \`Foo\` type.
"""
type Foo implements Bar {
one: Type
two(argument: InputType!): Type
three(argument: InputType, other: String): Int
four(argument: String = "string"): String
five(argument: [String] = ["string", "string"]): String
six(argument: InputType = {key: "value"}): Type
seven(argument: Int = null): Type
}
type AnnotatedObject @onObject(arg: "value") {
annotatedField(arg: Type = "default" @onArg): Type @onField
}
type AnnotatedObject @onObject(arg: "value") {
annotatedField(arg: Type = "default" @onArg): Type @onField
}
type UndefinedType
type UndefinedType
extend type Foo {
seven(argument: [String]): Type
}
extend type Foo {
seven(argument: [String]): Type
}
extend type Foo @onType
extend type Foo @onType
interface Bar {
one: Type
four(argument: String = "string"): String
}
interface Bar {
one: Type
four(argument: String = "string"): String
}
interface AnnotatedInterface @onInterface {
annotatedField(arg: Type @onArg): Type @onField
}
interface AnnotatedInterface @onInterface {
annotatedField(arg: Type @onArg): Type @onField
}
interface UndefinedInterface
interface UndefinedInterface
extend interface Bar {
two(argument: InputType!): Type
}
extend interface Bar {
two(argument: InputType!): Type
}
extend interface Bar @onInterface
extend interface Bar @onInterface
union Feed = Story | Article | Advert
union Feed = Story | Article | Advert
union AnnotatedUnion @onUnion = A | B
union AnnotatedUnion @onUnion = A | B
union AnnotatedUnionTwo @onUnion = A | B
union AnnotatedUnionTwo @onUnion = A | B
union UndefinedUnion
union UndefinedUnion
extend union Feed = Photo | Video
extend union Feed = Photo | Video
extend union Feed @onUnion
extend union Feed @onUnion
scalar CustomScalar
scalar CustomScalar
scalar AnnotatedScalar @onScalar
scalar AnnotatedScalar @onScalar
extend scalar CustomScalar @onScalar
extend scalar CustomScalar @onScalar
enum Site {
DESKTOP
MOBILE
}
enum Site {
DESKTOP
MOBILE
}
enum AnnotatedEnum @onEnum {
ANNOTATED_VALUE @onEnumValue
OTHER_VALUE
}
enum AnnotatedEnum @onEnum {
ANNOTATED_VALUE @onEnumValue
OTHER_VALUE
}
enum UndefinedEnum
enum UndefinedEnum
extend enum Site {
VR
}
extend enum Site {
VR
}
extend enum Site @onEnum
extend enum Site @onEnum
input InputType {
key: String!
answer: Int = 42
}
input InputType {
key: String!
answer: Int = 42
}
input AnnotatedInput @onInputObject {
annotatedField: Type @onField
}
input AnnotatedInput @onInputObject {
annotatedField: Type @onField
}
input UndefinedInput
input UndefinedInput
extend input InputType {
other: Float = 1.23e4
}
extend input InputType {
other: Float = 1.23e4
}
extend input InputType @onInputObject
extend input InputType @onInputObject
directive @skip(if: Boolean!) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT
directive @skip(if: Boolean!) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT
directive @include(if: Boolean!) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT
directive @include(if: Boolean!) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT
directive @include2(if: Boolean!) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT
`,
);
directive @include2(if: Boolean!) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT
`);
});
});
1 change: 1 addition & 0 deletions src/subscription/subscribe.js
Expand Up @@ -84,6 +84,7 @@ export function subscribe(
fieldResolver,
subscribeFieldResolver,
) {
/* eslint-enable no-redeclare */
// Extract arguments from object args if provided.
return arguments.length === 1
? subscribeImpl(
Expand Down
3 changes: 0 additions & 3 deletions src/type/__tests__/validation-test.js
Expand Up @@ -5,9 +5,6 @@
* LICENSE file in the root directory of this source tree.
*/

// 80+ char lines are useful in describe/it, so ignore in this file.
/* eslint-disable max-len */

import { describe, it } from 'mocha';
import { expect } from 'chai';
import {
Expand Down
3 changes: 0 additions & 3 deletions src/utilities/__tests__/schemaPrinter-test.js
Expand Up @@ -5,9 +5,6 @@
* LICENSE file in the root directory of this source tree.
*/

// 80+ char lines are useful in describe/it, so ignore in this file.
/* eslint-disable max-len */

import { describe, it } from 'mocha';
import { expect } from 'chai';
import dedent from '../../jsutils/dedent';
Expand Down
3 changes: 0 additions & 3 deletions src/validation/__tests__/ExecutableDefinitions-test.js
Expand Up @@ -5,9 +5,6 @@
* LICENSE file in the root directory of this source tree.
*/

// 80+ char lines are useful in tests, so ignore in this file.
/* eslint-disable max-len */

import { describe, it } from 'mocha';
import { expectPassesRule, expectFailsRule } from './harness';
import {
Expand Down
3 changes: 0 additions & 3 deletions src/validation/__tests__/KnownDirectives-test.js
Expand Up @@ -5,9 +5,6 @@
* LICENSE file in the root directory of this source tree.
*/

// 80+ char lines are useful in tests, so ignore in this file.
/* eslint-disable max-len */

import { describe, it } from 'mocha';
import { expectPassesRule, expectFailsRule } from './harness';
import {
Expand Down

0 comments on commit 8d1ae25

Please sign in to comment.