Skip to content

Commit 6be358d

Browse files
committed
Sort imports
1 parent 1163477 commit 6be358d

File tree

8 files changed

+42
-49
lines changed

8 files changed

+42
-49
lines changed

.eslintrc.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,14 @@ extends:
1414
- 'plugin:react/jsx-runtime'
1515
- 'plugin:react-hooks/recommended'
1616
rules:
17-
# 'simple-import-sort/imports': error
17+
'simple-import-sort/imports': error
1818
'simple-import-sort/exports': error
1919
'import/no-extraneous-dependencies':
2020
[error, { devDependencies: ['**/*.config.{js,ts}', 'tests/**'] }]
2121

2222
# FIXME: remove below rules
2323
'no-var': off
2424
'prefer-const': off
25-
'simple-import-sort/imports': off
2625

2726
overrides:
2827
- files: '**/*.js'

src/editor/GraphQLEditor/GraphQLEditor.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ import 'codemirror/keymap/sublime';
1414
import 'codemirror/keymap/sublime';
1515

1616
import * as CodeMirror from 'codemirror';
17-
18-
import { GraphQLSchema, GraphQLList, GraphQLNonNull } from 'graphql';
17+
import { GraphQLList, GraphQLNonNull, GraphQLSchema } from 'graphql';
1918
import * as marked from 'marked';
2019
import * as React from 'react';
2120

src/editor/index.tsx

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,17 @@ import './GraphQLEditor/editor.css';
44
import 'graphiql/graphiql.css';
55
import 'graphql-voyager/dist/voyager.css';
66

7+
import classNames from 'classnames';
78
import GraphiQL from 'graphiql';
9+
import { GraphQLSchema, Source } from 'graphql';
10+
import { Voyager } from 'graphql-voyager';
811
import * as React from 'react';
912
import * as ReactDOM from 'react-dom';
10-
import classNames from 'classnames';
11-
12-
import { Source, GraphQLSchema } from 'graphql';
1313

1414
import { buildWithFakeDefinitions } from '../fake_definition';
15-
1615
import GraphQLEditor from './GraphQLEditor/GraphQLEditor';
1716
import { ConsoleIcon, EditIcon, GithubIcon, VoyagerIcon } from './icons';
1817

19-
import { Voyager } from 'graphql-voyager';
20-
2118
type FakeEditorState = {
2219
value: string | null;
2320
cachedValue: string | null;

src/fake_definition.ts

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
11
import {
2-
Kind,
3-
Source,
2+
buildASTSchema,
43
DocumentNode,
4+
extendSchema,
55
GraphQLError,
66
GraphQLSchema,
7+
isInterfaceType,
8+
isObjectType,
9+
Kind,
710
parse,
11+
Source,
812
validate,
9-
extendSchema,
10-
buildASTSchema,
1113
validateSchema,
12-
isObjectType,
13-
isInterfaceType,
1414
ValuesOfCorrectTypeRule,
1515
} from 'graphql';
16-
1716
// FIXME
1817
import { validateSDL } from 'graphql/validation/validate';
1918

src/fake_schema.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
import * as assert from 'assert';
22
import {
3-
isListType,
4-
isNonNullType,
5-
isCompositeType,
6-
isEnumType,
7-
isLeafType,
8-
isAbstractType,
3+
defaultFieldResolver,
4+
defaultTypeResolver,
5+
getDirectiveValues,
96
getNullableType,
7+
GraphQLFieldResolver,
108
GraphQLLeafType,
119
GraphQLTypeResolver,
12-
GraphQLFieldResolver,
13-
defaultTypeResolver,
14-
defaultFieldResolver,
15-
getDirectiveValues,
10+
isAbstractType,
11+
isCompositeType,
12+
isEnumType,
13+
isLeafType,
14+
isListType,
15+
isNonNullType,
1616
} from 'graphql';
1717

1818
import {
19+
fakeValue,
1920
getRandomInt,
2021
getRandomItem,
2122
stdScalarFakers,
22-
fakeValue,
2323
} from './fake';
2424

2525
type FakeArgs = {

src/index.ts

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,21 @@
11
#!/usr/bin/env node
22

3-
import * as fs from 'fs';
4-
import * as path from 'path';
5-
6-
import * as express from 'express';
3+
import * as bodyParser from 'body-parser';
74
import * as chalk from 'chalk';
8-
import * as open from 'open';
95
import * as cors from 'cors';
10-
import * as bodyParser from 'body-parser';
6+
import * as express from 'express';
117
import { graphqlHTTP } from 'express-graphql';
12-
import { Source, printSchema } from 'graphql';
8+
import * as fs from 'fs';
9+
import { printSchema, Source } from 'graphql';
1310
import { express as voyagerMiddleware } from 'graphql-voyager/middleware';
11+
import * as open from 'open';
12+
import * as path from 'path';
1413

1514
import { parseCLI } from './cli';
15+
import { buildWithFakeDefinitions, ValidationErrors } from './fake_definition';
16+
import { fakeFieldResolver, fakeTypeResolver } from './fake_schema';
1617
import { getProxyExecuteFn } from './proxy';
17-
import { existsSync, readSDL, getRemoteSchema } from './utils';
18-
import { fakeTypeResolver, fakeFieldResolver } from './fake_schema';
19-
import { ValidationErrors, buildWithFakeDefinitions } from './fake_definition';
18+
import { existsSync, getRemoteSchema, readSDL } from './utils';
2019

2120
const log = console.log;
2221

src/proxy.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
import { IncomingMessage } from 'http';
21
import {
2+
execute,
3+
ExecutionArgs,
4+
GraphQLError,
5+
isAbstractType,
36
Kind,
47
print,
5-
visit,
6-
execute,
8+
separateOperations,
79
TypeInfo,
8-
isAbstractType,
10+
visit,
911
visitWithTypeInfo,
10-
separateOperations,
11-
ExecutionArgs,
12-
GraphQLError,
1312
} from 'graphql';
13+
import { IncomingMessage } from 'http';
1414

1515
import { graphqlRequest } from './utils';
1616

src/utils.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import * as fs from 'fs';
2-
import * as fetch from 'node-fetch';
3-
import { Headers } from 'node-fetch';
42
import {
5-
Source,
6-
GraphQLSchema,
73
buildClientSchema,
84
getIntrospectionQuery,
5+
GraphQLSchema,
6+
Source,
97
} from 'graphql';
8+
import * as fetch from 'node-fetch';
9+
import { Headers } from 'node-fetch';
1010

1111
export function existsSync(filePath: string): boolean {
1212
try {

0 commit comments

Comments
 (0)