Use eslint-plugin-simple-import-sort (#52090)

This commit is contained in:
Jake Bailey
2023-02-02 14:36:21 -08:00
committed by GitHub
parent 0d251ba9bc
commit 2a8436c529
145 changed files with 527 additions and 487 deletions

View File

@@ -1,6 +1,6 @@
import chalk from "chalk";
import { join } from "path";
import { readFileSync } from "fs";
import { join } from "path";
let playwright;
try {

View File

@@ -1,5 +1,5 @@
import { dirname, join, resolve } from "path";
import { existsSync } from "fs";
import { dirname, join, resolve } from "path";
import url from "url";
const __filename = url.fileURLToPath(new URL(import.meta.url));

View File

@@ -1,7 +1,8 @@
import { Debouncer, exec } from "./utils.mjs";
import { resolve } from "path";
import { findUpRoot } from "./findUpDir.mjs";
import cmdLineOptions from "./options.mjs";
import { Debouncer, exec } from "./utils.mjs";
class ProjectQueue {
/**

View File

@@ -1,12 +1,13 @@
import { CancelError } from "@esfx/canceltoken";
import chalk from "chalk";
import del from "del";
import fs from "fs";
import os from "os";
import path from "path";
import chalk from "chalk";
import { findUpFile, findUpRoot } from "./findUpDir.mjs";
import cmdLineOptions from "./options.mjs";
import { exec } from "./utils.mjs";
import { findUpFile, findUpRoot } from "./findUpDir.mjs";
import { CancelError } from "@esfx/canceltoken";
const mochaJs = path.resolve(findUpRoot(), "node_modules", "mocha", "bin", "_mocha");
export const localBaseline = "tests/baselines/local/";

View File

@@ -1,13 +1,13 @@
/* eslint-disable no-restricted-globals */
import fs from "fs";
import path from "path";
import chalk from "chalk";
import which from "which";
import { spawn } from "child_process";
import assert from "assert";
import JSONC from "jsonc-parser";
import { CancelError } from "@esfx/canceltoken";
import assert from "assert";
import chalk from "chalk";
import { spawn } from "child_process";
import fs from "fs";
import JSONC from "jsonc-parser";
import path from "path";
import which from "which";
/**
* Executes the provided command once with the supplied arguments.

View File

@@ -1,6 +1,6 @@
import { normalize, relative } from "path";
import assert from "assert";
import { readFileSync, writeFileSync } from "fs";
import { normalize, relative } from "path";
import url from "url";
const __filename = url.fileURLToPath(new URL(import.meta.url));

View File

@@ -5,12 +5,13 @@
* bundle as namespaces again, even though the project is modules.
*/
import fs from "fs";
import path from "path";
import minimist from "minimist";
import url from "url";
import ts from "../lib/typescript.js";
import assert, { fail } from "assert";
import fs from "fs";
import minimist from "minimist";
import path from "path";
import url from "url";
import ts from "../lib/typescript.js";
const __filename = url.fileURLToPath(new URL(import.meta.url));
const __dirname = path.dirname(__filename);

View File

@@ -1,9 +1,9 @@
// This file requires a modern version of node 14+, and grep to be available.
// node scripts/find-unused-diagnostic-messages.mjs
import { execSync } from "child_process";
import { readFileSync } from "fs";
import { EOL } from "os";
import { execSync } from "child_process";
const diags = readFileSync("src/compiler/diagnosticInformationMap.generated.ts", "utf8");
const startOfDiags = diags.split("export const Diagnostics")[1];

View File

@@ -1,6 +1,6 @@
import { XMLParser } from "fast-xml-parser";
import fs from "fs";
import path from "path";
import { XMLParser } from "fast-xml-parser";
/** @typedef {{
LCX: {

View File

@@ -1,7 +1,7 @@
import * as fs from "fs";
import * as path from "path";
import * as os from "os";
import * as childProcess from "child_process";
import * as fs from "fs";
import * as os from "os";
import * as path from "path";
import url from "url";
const __filename = url.fileURLToPath(new URL(import.meta.url));

View File

@@ -1,6 +1,7 @@
import fs from "fs";
import path from "path";
import url from "url";
import { findUpRoot } from "./build/findUpDir.mjs";
const __filename = url.fileURLToPath(new URL(import.meta.url));

View File

@@ -1,9 +1,10 @@
import { Octokit } from "@octokit/rest";
import { runSequence } from "./run-sequence.mjs";
import fs from "fs";
import path from "path";
import url from "url";
import { runSequence } from "./run-sequence.mjs";
const __filename = url.fileURLToPath(new URL(import.meta.url));
const __dirname = path.dirname(__filename);

View File

@@ -1,4 +1,5 @@
import { Octokit } from "@octokit/rest";
import { runSequence } from "./run-sequence.mjs";
const userName = process.env.GH_USERNAME || "typescript-bot";

View File

@@ -1,8 +1,8 @@
import { Octokit } from "@octokit/rest";
import fs from "fs";
import ado from "azure-devops-node-api";
import fetch from "node-fetch";
import assert from "assert";
import ado from "azure-devops-node-api";
import fs from "fs";
import fetch from "node-fetch";
async function main() {

View File

@@ -1,5 +1,5 @@
import path from "path";
import fs from "fs";
import path from "path";
/** @typedef {{
category: string;

View File

@@ -1,8 +1,9 @@
import fs from "fs-extra";
import path from "path";
import glob from "glob";
import url from "url";
import del from "del";
import fs from "fs-extra";
import glob from "glob";
import path from "path";
import url from "url";
import { localizationDirectories } from "./build/localization.mjs";
const __filename = url.fileURLToPath(new URL(import.meta.url));

View File

@@ -1,4 +1,5 @@
import { Octokit } from "@octokit/rest";
import { runSequence } from "./run-sequence.mjs";
// The first is used by bot-based kickoffs, the second by automatic triggers