Enforce import order

This commit is contained in:
Asher 2020-08-04 15:51:39 -05:00
parent f7790c9719
commit d8568ebaa9
No known key found for this signature in database
GPG Key ID: D63C1EF81242354A
4 changed files with 6 additions and 4 deletions

View File

@ -24,6 +24,8 @@ rules:
"@typescript-eslint/no-use-before-define": off
"@typescript-eslint/no-non-null-assertion": off
eqeqeq: error
import/order:
[error, { alphabetize: { order: "asc" }, groups: [["builtin", "external", "internal"], "parent", "sibling"] }]
settings:
# Does not work with CommonJS unfortunately.

View File

@ -1,8 +1,8 @@
import { logger } from "@coder/logger"
import * as fs from "fs-extra"
import * as path from "path"
import { paths } from "./util"
import { logger } from "@coder/logger"
import { Route } from "./http"
import { paths } from "./util"
export type Settings = { [key: string]: Settings | string | boolean | number }

View File

@ -1,10 +1,10 @@
import * as cp from "child_process"
import * as crypto from "crypto"
import envPaths from "env-paths"
import * as fs from "fs-extra"
import * as os from "os"
import * as path from "path"
import * as util from "util"
import envPaths from "env-paths"
import xdgBasedir from "xdg-basedir"
export const tmpdir = path.join(os.tmpdir(), "code-server")

View File

@ -6,8 +6,8 @@ import * as net from "net"
import * as path from "path"
import * as tls from "tls"
import { Emitter } from "../src/common/emitter"
import { generateCertificate, tmpdir } from "../src/node/util"
import { SocketProxyProvider } from "../src/node/socket"
import { generateCertificate, tmpdir } from "../src/node/util"
describe("SocketProxyProvider", () => {
const provider = new SocketProxyProvider()