Skip to content

Commit 62e94d3

Browse files
committed
Make _namespaces imports come before relative imports
1 parent b91e5df commit 62e94d3

File tree

254 files changed

+358
-84
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

254 files changed

+358
-84
lines changed

.eslintrc.json

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,28 @@
2525
"/coverage/**"
2626
],
2727
"rules": {
28-
"simple-import-sort/imports": "error",
28+
"simple-import-sort/imports": [
29+
"error",
30+
{
31+
"groups": [
32+
// Side effect imports.
33+
["^\\u0000"],
34+
// Node.js builtins prefixed with `node:`.
35+
["^node:"],
36+
// Packages.
37+
// Things that start with a letter (or digit or underscore), or `@` followed by a letter.
38+
["^@?\\w"],
39+
// Absolute imports and other imports such as Vue-style `@/foo`.
40+
// Anything not matched in another group.
41+
["^"],
42+
// Namespace barrels, which help dictate code execution order.
43+
["_namespaces"],
44+
// Relative imports.
45+
// Anything that starts with a dot.
46+
["^\\."]
47+
]
48+
}
49+
],
2950
"simple-import-sort/exports": "error",
3051

3152
"@typescript-eslint/adjacent-overload-signatures": "error",

src/compiler/binder.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,7 @@ import {
314314
WithStatement,
315315
} from "./_namespaces/ts";
316316
import * as performance from "./_namespaces/ts.performance";
317+
317318
import * as Debug from "./debug";
318319

319320
/** @internal */

src/compiler/builder.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ import {
8080
WriteFileCallback,
8181
WriteFileCallbackData,
8282
} from "./_namespaces/ts";
83+
8384
import * as Debug from "./debug";
8485

8586
/** @internal */

src/compiler/builderState.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ import {
3232
toPath,
3333
TypeChecker,
3434
} from "./_namespaces/ts";
35+
3536
import * as Debug from "./debug";
3637

3738
/** @internal */

src/compiler/checker.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1063,6 +1063,7 @@ import {
10631063
} from "./_namespaces/ts";
10641064
import * as moduleSpecifiers from "./_namespaces/ts.moduleSpecifiers";
10651065
import * as performance from "./_namespaces/ts.performance";
1066+
10661067
import * as Debug from "./debug";
10671068

10681069
const ambientModuleSymbolRegex = /^".+"$/;

src/compiler/commandLineParser.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ import {
119119
WatchFileKind,
120120
WatchOptions,
121121
} from "./_namespaces/ts";
122+
122123
import * as Debug from "./debug";
123124

124125
/** @internal */

src/compiler/core.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import {
1313
TextSpan,
1414
UnderscoreEscapedMap,
1515
} from "./_namespaces/ts";
16+
1617
import * as Debug from "./debug";
1718

1819
/** @internal */

src/compiler/emitter.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,7 @@ import {
454454
YieldExpression,
455455
} from "./_namespaces/ts";
456456
import * as performance from "./_namespaces/ts.performance";
457+
457458
import * as Debug from "./debug";
458459

459460
const brackets = createBracketsMap();

src/compiler/factory/emitHelpers.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ import {
3434
TransformationContext,
3535
UnscopedEmitHelper,
3636
} from "../_namespaces/ts";
37+
3738
import * as Debug from "../debug";
3839

3940
/** @internal */

src/compiler/factory/emitNode.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import {
2626
TypeNode,
2727
TypeParameterDeclaration,
2828
} from "../_namespaces/ts";
29+
2930
import * as Debug from "../debug";
3031

3132
/**

0 commit comments

Comments
 (0)