Skip to content

Commit d8568eb

Browse files
committed
Enforce import order
1 parent f7790c9 commit d8568eb

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

.eslintrc.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ rules:
2424
"@typescript-eslint/no-use-before-define": off
2525
"@typescript-eslint/no-non-null-assertion": off
2626
eqeqeq: error
27+
import/order:
28+
[error, { alphabetize: { order: "asc" }, groups: [["builtin", "external", "internal"], "parent", "sibling"] }]
2729

2830
settings:
2931
# Does not work with CommonJS unfortunately.

src/node/settings.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1+
import { logger } from "@coder/logger"
12
import * as fs from "fs-extra"
23
import * as path from "path"
3-
import { paths } from "./util"
4-
import { logger } from "@coder/logger"
54
import { Route } from "./http"
5+
import { paths } from "./util"
66

77
export type Settings = { [key: string]: Settings | string | boolean | number }
88

src/node/util.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import * as cp from "child_process"
22
import * as crypto from "crypto"
3+
import envPaths from "env-paths"
34
import * as fs from "fs-extra"
45
import * as os from "os"
56
import * as path from "path"
67
import * as util from "util"
7-
import envPaths from "env-paths"
88
import xdgBasedir from "xdg-basedir"
99

1010
export const tmpdir = path.join(os.tmpdir(), "code-server")

test/socket.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import * as net from "net"
66
import * as path from "path"
77
import * as tls from "tls"
88
import { Emitter } from "../src/common/emitter"
9-
import { generateCertificate, tmpdir } from "../src/node/util"
109
import { SocketProxyProvider } from "../src/node/socket"
10+
import { generateCertificate, tmpdir } from "../src/node/util"
1111

1212
describe("SocketProxyProvider", () => {
1313
const provider = new SocketProxyProvider()

0 commit comments

Comments
 (0)