Skip to content

Commit c70f5cc

Browse files
authored
Merge pull request #1148 from APIs-guru/noMaxLen
Remove eslint comments unnecessary after 40f73fd
2 parents ada56fe + 8d1ae25 commit c70f5cc

File tree

13 files changed

+78
-112
lines changed

13 files changed

+78
-112
lines changed

src/__tests__/starWarsIntrospection-test.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@ import { describe, it } from 'mocha';
1212
import { StarWarsSchema } from './starWarsSchema.js';
1313
import { graphql } from '../graphql';
1414

15-
// 80+ char lines are useful in describe/it, so ignore in this file.
16-
/* eslint-disable max-len */
17-
1815
describe('Star Wars Introspection Tests', () => {
1916
describe('Basic Introspection', () => {
2017
it('Allows querying the schema for types', async () => {

src/__tests__/starWarsQuery-test.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@ import { describe, it } from 'mocha';
1212
import { StarWarsSchema } from './starWarsSchema.js';
1313
import { graphql } from '../graphql';
1414

15-
// 80+ char lines are useful in describe/it, so ignore in this file.
16-
/* eslint-disable max-len */
17-
1815
describe('Star Wars Query Tests', () => {
1916
describe('Basic Queries', () => {
2017
it('Correctly identifies R2-D2 as the hero of the Star Wars Saga', async () => {

src/execution/__tests__/executor-test.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -393,9 +393,8 @@ describe('Execute: Handles basic execution tasks', () => {
393393
throw new Error('Error getting syncError');
394394
},
395395
syncRawError() {
396-
/* eslint-disable */
396+
// eslint-disable-next-line no-throw-literal
397397
throw 'Error getting syncRawError';
398-
/* eslint-enable */
399398
},
400399
syncReturnError() {
401400
return new Error('Error getting syncReturnError');

src/execution/__tests__/lists-test.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@
55
* LICENSE file in the root directory of this source tree.
66
*/
77

8-
// 80+ char lines are useful in describe/it, so ignore in this file.
9-
/* eslint-disable max-len */
10-
118
import { expect } from 'chai';
129
import { describe, it } from 'mocha';
1310
import { formatError } from '../../error';

src/execution/__tests__/mutations-test.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@
55
* LICENSE file in the root directory of this source tree.
66
*/
77

8-
// 80+ char lines are useful in describe/it, so ignore in this file.
9-
/* eslint-disable max-len */
10-
118
import { expect } from 'chai';
129
import { describe, it } from 'mocha';
1310
import { execute } from '../execute';

src/execution/__tests__/nonnull-test.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@
55
* LICENSE file in the root directory of this source tree.
66
*/
77

8-
// 80+ char lines are useful in describe/it, so ignore in this file.
9-
/* eslint-disable max-len */
10-
118
import { expect } from 'chai';
129
import { describe, it } from 'mocha';
1310
import { execute } from '../execute';

src/execution/__tests__/variables-test.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@
55
* LICENSE file in the root directory of this source tree.
66
*/
77

8-
// 80+ char lines are useful in describe/it, so ignore in this file.
9-
/* eslint-disable max-len */
10-
118
import { expect } from 'chai';
129
import { describe, it } from 'mocha';
1310
import { execute } from '../execute';

src/language/__tests__/lexer-test.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ function expectSyntaxError(text, message, location) {
2525
}
2626
}
2727

28-
/* eslint-disable max-len */
29-
3028
describe('Lexer', () => {
3129
it('disallows uncommon control characters', () => {
3230
expectSyntaxError(

src/language/__tests__/schema-printer-test.js

Lines changed: 77 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import { readFileSync } from 'fs';
1111
import { join } from 'path';
1212
import { parse } from '../parser';
1313
import { print } from '../printer';
14+
import dedent from '../../jsutils/dedent';
1415

1516
describe('Printer', () => {
1617
it('prints minimal ast', () => {
@@ -45,115 +46,113 @@ describe('Printer', () => {
4546

4647
const printed = print(ast);
4748

48-
/* eslint-disable max-len */
49-
expect(printed).to.equal(
50-
`schema {
51-
query: QueryType
52-
mutation: MutationType
53-
}
49+
expect(printed).to.equal(dedent`
50+
schema {
51+
query: QueryType
52+
mutation: MutationType
53+
}
5454
55-
"""
56-
This is a description
57-
of the \`Foo\` type.
58-
"""
59-
type Foo implements Bar {
60-
one: Type
61-
two(argument: InputType!): Type
62-
three(argument: InputType, other: String): Int
63-
four(argument: String = "string"): String
64-
five(argument: [String] = ["string", "string"]): String
65-
six(argument: InputType = {key: "value"}): Type
66-
seven(argument: Int = null): Type
67-
}
55+
"""
56+
This is a description
57+
of the \`Foo\` type.
58+
"""
59+
type Foo implements Bar {
60+
one: Type
61+
two(argument: InputType!): Type
62+
three(argument: InputType, other: String): Int
63+
four(argument: String = "string"): String
64+
five(argument: [String] = ["string", "string"]): String
65+
six(argument: InputType = {key: "value"}): Type
66+
seven(argument: Int = null): Type
67+
}
6868
69-
type AnnotatedObject @onObject(arg: "value") {
70-
annotatedField(arg: Type = "default" @onArg): Type @onField
71-
}
69+
type AnnotatedObject @onObject(arg: "value") {
70+
annotatedField(arg: Type = "default" @onArg): Type @onField
71+
}
7272
73-
type UndefinedType
73+
type UndefinedType
7474
75-
extend type Foo {
76-
seven(argument: [String]): Type
77-
}
75+
extend type Foo {
76+
seven(argument: [String]): Type
77+
}
7878
79-
extend type Foo @onType
79+
extend type Foo @onType
8080
81-
interface Bar {
82-
one: Type
83-
four(argument: String = "string"): String
84-
}
81+
interface Bar {
82+
one: Type
83+
four(argument: String = "string"): String
84+
}
8585
86-
interface AnnotatedInterface @onInterface {
87-
annotatedField(arg: Type @onArg): Type @onField
88-
}
86+
interface AnnotatedInterface @onInterface {
87+
annotatedField(arg: Type @onArg): Type @onField
88+
}
8989
90-
interface UndefinedInterface
90+
interface UndefinedInterface
9191
92-
extend interface Bar {
93-
two(argument: InputType!): Type
94-
}
92+
extend interface Bar {
93+
two(argument: InputType!): Type
94+
}
9595
96-
extend interface Bar @onInterface
96+
extend interface Bar @onInterface
9797
98-
union Feed = Story | Article | Advert
98+
union Feed = Story | Article | Advert
9999
100-
union AnnotatedUnion @onUnion = A | B
100+
union AnnotatedUnion @onUnion = A | B
101101
102-
union AnnotatedUnionTwo @onUnion = A | B
102+
union AnnotatedUnionTwo @onUnion = A | B
103103
104-
union UndefinedUnion
104+
union UndefinedUnion
105105
106-
extend union Feed = Photo | Video
106+
extend union Feed = Photo | Video
107107
108-
extend union Feed @onUnion
108+
extend union Feed @onUnion
109109
110-
scalar CustomScalar
110+
scalar CustomScalar
111111
112-
scalar AnnotatedScalar @onScalar
112+
scalar AnnotatedScalar @onScalar
113113
114-
extend scalar CustomScalar @onScalar
114+
extend scalar CustomScalar @onScalar
115115
116-
enum Site {
117-
DESKTOP
118-
MOBILE
119-
}
116+
enum Site {
117+
DESKTOP
118+
MOBILE
119+
}
120120
121-
enum AnnotatedEnum @onEnum {
122-
ANNOTATED_VALUE @onEnumValue
123-
OTHER_VALUE
124-
}
121+
enum AnnotatedEnum @onEnum {
122+
ANNOTATED_VALUE @onEnumValue
123+
OTHER_VALUE
124+
}
125125
126-
enum UndefinedEnum
126+
enum UndefinedEnum
127127
128-
extend enum Site {
129-
VR
130-
}
128+
extend enum Site {
129+
VR
130+
}
131131
132-
extend enum Site @onEnum
132+
extend enum Site @onEnum
133133
134-
input InputType {
135-
key: String!
136-
answer: Int = 42
137-
}
134+
input InputType {
135+
key: String!
136+
answer: Int = 42
137+
}
138138
139-
input AnnotatedInput @onInputObject {
140-
annotatedField: Type @onField
141-
}
139+
input AnnotatedInput @onInputObject {
140+
annotatedField: Type @onField
141+
}
142142
143-
input UndefinedInput
143+
input UndefinedInput
144144
145-
extend input InputType {
146-
other: Float = 1.23e4
147-
}
145+
extend input InputType {
146+
other: Float = 1.23e4
147+
}
148148
149-
extend input InputType @onInputObject
149+
extend input InputType @onInputObject
150150
151-
directive @skip(if: Boolean!) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT
151+
directive @skip(if: Boolean!) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT
152152
153-
directive @include(if: Boolean!) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT
153+
directive @include(if: Boolean!) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT
154154
155-
directive @include2(if: Boolean!) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT
156-
`,
157-
);
155+
directive @include2(if: Boolean!) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT
156+
`);
158157
});
159158
});

src/type/__tests__/validation-test.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@
55
* LICENSE file in the root directory of this source tree.
66
*/
77

8-
// 80+ char lines are useful in describe/it, so ignore in this file.
9-
/* eslint-disable max-len */
10-
118
import { describe, it } from 'mocha';
129
import { expect } from 'chai';
1310
import {

src/utilities/__tests__/schemaPrinter-test.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@
55
* LICENSE file in the root directory of this source tree.
66
*/
77

8-
// 80+ char lines are useful in describe/it, so ignore in this file.
9-
/* eslint-disable max-len */
10-
118
import { describe, it } from 'mocha';
129
import { expect } from 'chai';
1310
import dedent from '../../jsutils/dedent';

src/validation/__tests__/ExecutableDefinitions-test.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@
55
* LICENSE file in the root directory of this source tree.
66
*/
77

8-
// 80+ char lines are useful in tests, so ignore in this file.
9-
/* eslint-disable max-len */
10-
118
import { describe, it } from 'mocha';
129
import { expectPassesRule, expectFailsRule } from './harness';
1310
import {

src/validation/__tests__/KnownDirectives-test.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@
55
* LICENSE file in the root directory of this source tree.
66
*/
77

8-
// 80+ char lines are useful in tests, so ignore in this file.
9-
/* eslint-disable max-len */
10-
118
import { describe, it } from 'mocha';
129
import { expectPassesRule, expectFailsRule } from './harness';
1310
import {

0 commit comments

Comments
 (0)