build: add import/order eslint rule (#44108)

build: add import/order eslint rule (#44085)

* build: add import/order eslint rule

* chore: run lint:js --fix
This commit is contained in:
Samuel Attard
2024-10-03 15:21:54 -07:00
committed by GitHub
parent 6da785fd10
commit ba6d9291d2
208 changed files with 841 additions and 440 deletions

View File

@@ -1,6 +1,6 @@
import path = require('node:path');
import fs = require('node:fs/promises');
import { randomBytes } from 'node:crypto';
import fs = require('node:fs/promises');
import path = require('node:path');
const IS_CI = !!process.env.CI;
const ARTIFACT_DIR = path.join(__dirname, '..', 'artifacts');

View File

@@ -1,7 +1,8 @@
import { expect } from 'chai';
import * as cp from 'node:child_process';
import * as fs from 'node:fs';
import * as path from 'node:path';
import { expect } from 'chai';
const features = process._linkedBinding('electron_common_features');
const fixturesPath = path.resolve(__dirname, '..', 'fixtures');

View File

@@ -1,5 +1,6 @@
import * as cp from 'node:child_process';
import * as fs from 'original-fs';
import * as cp from 'node:child_process';
import * as os from 'node:os';
import * as path from 'node:path';

View File

@@ -1,7 +1,9 @@
import { expect } from 'chai';
import * as dns from 'node:dns';
import * as http from 'node:http';
import { Socket } from 'node:net';
import { defer, listen } from './spec-helpers';
// See https://github.com/nodejs/node/issues/40702.

View File

@@ -1,7 +1,9 @@
import { screen, desktopCapturer, NativeImage } from 'electron';
import { createArtifactWithRandomId } from './artifacts';
import { AssertionError } from 'chai';
import { createArtifactWithRandomId } from './artifacts';
export enum HexColors {
GREEN = '#00b140',
PURPLE = '#6a0dad',

View File

@@ -1,14 +1,16 @@
import * as childProcess from 'node:child_process';
import * as path from 'node:path';
import * as http from 'node:http';
import * as https from 'node:https';
import * as http2 from 'node:http2';
import * as net from 'node:net';
import * as v8 from 'node:v8';
import * as url from 'node:url';
import { SuiteFunction, TestFunction } from 'mocha';
import { BrowserWindow } from 'electron/main';
import { AssertionError } from 'chai';
import { SuiteFunction, TestFunction } from 'mocha';
import * as childProcess from 'node:child_process';
import * as http from 'node:http';
import * as http2 from 'node:http2';
import * as https from 'node:https';
import * as net from 'node:net';
import * as path from 'node:path';
import * as url from 'node:url';
import * as v8 from 'node:v8';
const addOnly = <T>(fn: Function): T => {
const wrapped = (...args: any[]) => {

View File

@@ -1,5 +1,7 @@
import { expect } from 'chai';
import { BaseWindow, BrowserWindow } from 'electron/main';
import { expect } from 'chai';
import { once } from 'node:events';
async function ensureWindowIsClosed (window: BaseWindow | null) {