File tree Expand file tree Collapse file tree 7 files changed +29
-26
lines changed Expand file tree Collapse file tree 7 files changed +29
-26
lines changed Original file line number Diff line number Diff line change 76
76
import/no-webpack-loader-syntax : error
77
77
import/no-self-import : error
78
78
import/no-cycle : off # TODO
79
- import/no-useless-path-segments : off # TODO
79
+ import/no-useless-path-segments : error
80
80
import/no-relative-parent-imports : off
81
81
82
82
# Helpful warnings
@@ -98,12 +98,12 @@ rules:
98
98
99
99
# Style guide
100
100
# https://github.com/benmosher/eslint-plugin-import#style-guide
101
- import/first : off # TODO
101
+ import/first : error
102
102
import/exports-last : off
103
103
import/no-duplicates : error
104
104
import/no-namespace : error
105
105
import/extensions : [error, never] # TODO: switch to ignorePackages
106
- import/order : off # TODO
106
+ import/order : error
107
107
import/newline-after-import : error
108
108
import/prefer-default-export : off
109
109
import/max-dependencies : off
Original file line number Diff line number Diff line change 4
4
5
5
const util = require ( 'util' ) ;
6
6
const https = require ( 'https' ) ;
7
- const { exec } = require ( './utils' ) ;
7
+
8
8
const packageJSON = require ( '../package.json' ) ;
9
9
10
+ const { exec } = require ( './utils' ) ;
11
+
10
12
const graphqlRequest = util . promisify ( graphqlRequestImpl ) ;
11
13
const labelsConfig = {
12
14
'PR: breaking change 💥' : {
Original file line number Diff line number Diff line change @@ -5,10 +5,11 @@ import { describe, it } from 'mocha';
5
5
6
6
import dedent from '../../jsutils/dedent' ;
7
7
8
+ import { kitchenSinkSDL } from '../../__fixtures__' ;
9
+
8
10
import { parse } from '../parser' ;
9
11
10
12
import toJSONDeep from './toJSONDeep' ;
11
- import { kitchenSinkSDL } from '../../__fixtures__' ;
12
13
13
14
function expectSyntaxError ( text ) {
14
15
return expect ( ( ) => parse ( text ) ) . to . throw ( ) ;
Original file line number Diff line number Diff line change 1
1
// @flow strict
2
2
3
- import { type Location } from '../language /ast' ;
4
- import { type Source } from '../language /source' ;
5
- import { type SourceLocation , getLocation } from '../language /location' ;
3
+ import { type Location } from './ast' ;
4
+ import { type Source } from './source' ;
5
+ import { type SourceLocation , getLocation } from './location' ;
6
6
7
7
/**
8
8
* Render a helpful description of the location in the GraphQL Source document.
Original file line number Diff line number Diff line change @@ -8,9 +8,13 @@ import inspect from '../../jsutils/inspect';
8
8
9
9
import { parse } from '../../language/parser' ;
10
10
11
- import { GraphQLSchema } from '../../type/schema' ;
12
- import { GraphQLString } from '../../type/scalars' ;
13
- import { GraphQLDirective } from '../../type/directives' ;
11
+ import { extendSchema } from '../../utilities/extendSchema' ;
12
+ import { buildSchema } from '../../utilities/buildASTSchema' ;
13
+
14
+ import { GraphQLSchema } from '../schema' ;
15
+ import { GraphQLString } from '../scalars' ;
16
+ import { GraphQLDirective } from '../directives' ;
17
+ import { validateSchema , assertValidSchema } from '../validate' ;
14
18
import {
15
19
type GraphQLNamedType ,
16
20
type GraphQLInputType ,
@@ -23,12 +27,7 @@ import {
23
27
GraphQLUnionType ,
24
28
GraphQLEnumType ,
25
29
GraphQLInputObjectType ,
26
- } from '../../type/definition' ;
27
-
28
- import { extendSchema } from '../../utilities/extendSchema' ;
29
- import { buildSchema } from '../../utilities/buildASTSchema' ;
30
-
31
- import { validateSchema , assertValidSchema } from '../validate' ;
30
+ } from '../definition' ;
32
31
33
32
const SomeScalarType = new GraphQLScalarType ( { name : 'SomeScalar' } ) ;
34
33
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ import {
32
32
isInputObjectType ,
33
33
} from '../type/definition' ;
34
34
35
- import { astFromValue } from '../utilities /astFromValue' ;
35
+ import { astFromValue } from './astFromValue' ;
36
36
37
37
type Options = { |
38
38
/**
Original file line number Diff line number Diff line change @@ -84,6 +84,15 @@ import { OverlappingFieldsCanBeMerged } from './rules/OverlappingFieldsCanBeMerg
84
84
// Spec Section: "Input Object Field Uniqueness"
85
85
import { UniqueInputFieldNames } from './rules/UniqueInputFieldNames' ;
86
86
87
+ // SDL-specific validation rules
88
+ import { LoneSchemaDefinition } from './rules/LoneSchemaDefinition' ;
89
+ import { UniqueOperationTypes } from './rules/UniqueOperationTypes' ;
90
+ import { UniqueTypeNames } from './rules/UniqueTypeNames' ;
91
+ import { UniqueEnumValueNames } from './rules/UniqueEnumValueNames' ;
92
+ import { UniqueFieldDefinitionNames } from './rules/UniqueFieldDefinitionNames' ;
93
+ import { UniqueDirectiveNames } from './rules/UniqueDirectiveNames' ;
94
+ import { PossibleTypeExtensions } from './rules/PossibleTypeExtensions' ;
95
+
87
96
/**
88
97
* This set includes all validation rules defined by the GraphQL spec.
89
98
*
@@ -119,14 +128,6 @@ export const specifiedRules = Object.freeze([
119
128
UniqueInputFieldNames ,
120
129
] ) ;
121
130
122
- import { LoneSchemaDefinition } from './rules/LoneSchemaDefinition' ;
123
- import { UniqueOperationTypes } from './rules/UniqueOperationTypes' ;
124
- import { UniqueTypeNames } from './rules/UniqueTypeNames' ;
125
- import { UniqueEnumValueNames } from './rules/UniqueEnumValueNames' ;
126
- import { UniqueFieldDefinitionNames } from './rules/UniqueFieldDefinitionNames' ;
127
- import { UniqueDirectiveNames } from './rules/UniqueDirectiveNames' ;
128
- import { PossibleTypeExtensions } from './rules/PossibleTypeExtensions' ;
129
-
130
131
/**
131
132
* @internal
132
133
*/
You can’t perform that action at this time.
0 commit comments