Skip to content

Commit d786d90

Browse files
ESLint: require empty line between import groups (#2376)
1 parent f0c717c commit d786d90

File tree

15 files changed

+18
-1
lines changed

15 files changed

+18
-1
lines changed

.eslintrc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ rules:
103103
import/no-duplicates: error
104104
import/no-namespace: error
105105
import/extensions: [error, never] # TODO: switch to ignorePackages
106-
import/order: error
106+
import/order: [error, { newlines-between: always-and-inside-groups }]
107107
import/newline-after-import: error
108108
import/prefer-default-export: off
109109
import/max-dependencies: off

resources/build.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
const fs = require('fs');
66
const path = require('path');
77
const assert = require('assert');
8+
89
const babel = require('@babel/core');
10+
911
const {
1012
copyFile,
1113
writeFile,

resources/check-cover.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
'use strict';
44

55
const path = require('path');
6+
67
const {
78
exec,
89
execAsync,

resources/check-cycles.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ const os = require('os');
66
const fs = require('fs');
77
const path = require('path');
88
const assert = require('assert');
9+
910
const { exec } = require('./utils');
1011

1112
const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'flow-dep-graph'));

resources/gen-version.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
'use strict';
44

55
const { version } = require('../package.json');
6+
67
const { writeFile, parseSemver } = require('./utils');
78

89
const { major, minor, patch, preReleaseTag } = parseSemver(version);

src/error/formatError.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { SourceLocation } from '../language/location';
2+
23
import { GraphQLError } from './GraphQLError';
34

45
/**

src/error/locatedError.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { ASTNode } from '../language/ast';
2+
23
import { GraphQLError } from './GraphQLError';
34

45
/**

src/error/syntaxError.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { Source } from '../language/source';
2+
23
import { GraphQLError } from './GraphQLError';
34

45
/**

src/jsutils/toObjMap.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// @flow strict
22

33
import objectEntries from '../polyfills/objectEntries';
4+
45
import {
56
type ObjMap,
67
type ObjMapLike,

src/language/__tests__/parser-test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import { TokenKind } from '../tokenKind';
1414
import { parse, parseValue, parseType } from '../parser';
1515

1616
import { kitchenSinkQuery } from '../../__fixtures__';
17+
1718
import toJSONDeep from './toJSONDeep';
1819

1920
function expectSyntaxError(text) {

0 commit comments

Comments
 (0)