build: add import/order eslint rule (#44107)
build: add import/order eslint rule (#44085) * build: add import/order eslint rule * chore: run lint:js --fix
This commit is contained in:
parent
bf8de29f9b
commit
27c38bdead
209 changed files with 799 additions and 441 deletions
|
@ -1,4 +1,5 @@
|
|||
const { parseDocs } = require('@electron/docs-parser');
|
||||
|
||||
const fs = require('node:fs');
|
||||
const path = require('node:path');
|
||||
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
const args = require('minimist')(process.argv.slice(2));
|
||||
const { Octokit } = require('@octokit/rest');
|
||||
const minimist = require('minimist');
|
||||
|
||||
const args = minimist(process.argv.slice(2));
|
||||
|
||||
const octokit = new Octokit();
|
||||
|
||||
async function checkIfDocOnlyChange () {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
const fs = require('node:fs');
|
||||
const semver = require('semver');
|
||||
|
||||
const fs = require('node:fs');
|
||||
|
||||
const outputPath = process.argv[2];
|
||||
const currentVersion = process.argv[3];
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
const asar = require('@electron/asar');
|
||||
|
||||
const crypto = require('node:crypto');
|
||||
const fs = require('node:fs');
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
const asar = require('@electron/asar');
|
||||
|
||||
const assert = require('node:assert');
|
||||
const fs = require('node:fs');
|
||||
const os = require('node:os');
|
||||
|
|
|
@ -4,9 +4,12 @@ Usage:
|
|||
$ node ./script/gn-check.js [--outDir=dirName]
|
||||
*/
|
||||
|
||||
const minimist = require('minimist');
|
||||
|
||||
const cp = require('node:child_process');
|
||||
const path = require('node:path');
|
||||
const args = require('minimist')(process.argv.slice(2), { string: ['outDir'] });
|
||||
|
||||
const args = minimist(process.argv.slice(2), { string: ['outDir'] });
|
||||
|
||||
const { getOutDir } = require('./lib/utils');
|
||||
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
/* eslint-disable camelcase */
|
||||
|
||||
const { BlobServiceClient } = require('@azure/storage-blob');
|
||||
const minimist = require('minimist');
|
||||
|
||||
const path = require('node:path');
|
||||
|
||||
const { ELECTRON_ARTIFACTS_BLOB_STORAGE } = process.env;
|
||||
|
@ -10,7 +13,7 @@ if (!ELECTRON_ARTIFACTS_BLOB_STORAGE) {
|
|||
|
||||
const blobServiceClient = BlobServiceClient.fromConnectionString(ELECTRON_ARTIFACTS_BLOB_STORAGE);
|
||||
|
||||
const args = require('minimist')(process.argv.slice(2));
|
||||
const args = minimist(process.argv.slice(2));
|
||||
|
||||
let { prefix = '/', key_prefix = '', _: files } = args;
|
||||
if (prefix && !prefix.endsWith(path.sep)) prefix = path.resolve(prefix) + path.sep;
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
const chalk = require('chalk');
|
||||
const { GitProcess } = require('dugite');
|
||||
|
||||
const fs = require('node:fs');
|
||||
const os = require('node:os');
|
||||
const path = require('node:path');
|
||||
|
|
|
@ -1,14 +1,16 @@
|
|||
#!/usr/bin/env node
|
||||
|
||||
const crypto = require('node:crypto');
|
||||
const { GitProcess } = require('dugite');
|
||||
const childProcess = require('node:child_process');
|
||||
const { ESLint } = require('eslint');
|
||||
const fs = require('node:fs');
|
||||
const minimist = require('minimist');
|
||||
const path = require('node:path');
|
||||
const { getCodeBlocks } = require('@electron/lint-roller/dist/lib/markdown');
|
||||
|
||||
const { GitProcess } = require('dugite');
|
||||
const { ESLint } = require('eslint');
|
||||
const minimist = require('minimist');
|
||||
|
||||
const childProcess = require('node:child_process');
|
||||
const crypto = require('node:crypto');
|
||||
const fs = require('node:fs');
|
||||
const path = require('node:path');
|
||||
|
||||
const { chunkFilenames, findMatchingFiles } = require('./lib/utils');
|
||||
|
||||
const ELECTRON_ROOT = path.normalize(path.dirname(__dirname));
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
const minimist = require('minimist');
|
||||
|
||||
const cp = require('node:child_process');
|
||||
const fs = require('node:fs');
|
||||
const path = require('node:path');
|
||||
|
@ -13,7 +15,7 @@ if (!require.main) {
|
|||
throw new Error('Must call the nan spec runner directly');
|
||||
}
|
||||
|
||||
const args = require('minimist')(process.argv.slice(2), {
|
||||
const args = minimist(process.argv.slice(2), {
|
||||
string: ['only']
|
||||
});
|
||||
|
||||
|
|
|
@ -1,20 +1,23 @@
|
|||
const minimist = require('minimist');
|
||||
|
||||
const cp = require('node:child_process');
|
||||
const fs = require('node:fs');
|
||||
const path = require('node:path');
|
||||
|
||||
const args = require('minimist')(process.argv.slice(2), {
|
||||
const utils = require('./lib/utils');
|
||||
const DISABLED_TESTS = require('./node-disabled-tests.json');
|
||||
|
||||
const args = minimist(process.argv.slice(2), {
|
||||
boolean: ['default', 'validateDisabled'],
|
||||
string: ['jUnitDir']
|
||||
});
|
||||
|
||||
const BASE = path.resolve(__dirname, '../..');
|
||||
const DISABLED_TESTS = require('./node-disabled-tests.json');
|
||||
|
||||
const NODE_DIR = path.resolve(BASE, 'third_party', 'electron_node');
|
||||
const JUNIT_DIR = args.jUnitDir ? path.resolve(args.jUnitDir) : null;
|
||||
const TAP_FILE_NAME = 'test.tap';
|
||||
|
||||
const utils = require('./lib/utils');
|
||||
|
||||
if (!require.main) {
|
||||
throw new Error('Must call the node spec runner directly');
|
||||
}
|
||||
|
|
|
@ -1,9 +1,12 @@
|
|||
const { Octokit } = require('@octokit/rest');
|
||||
const got = require('got');
|
||||
|
||||
const assert = require('node:assert');
|
||||
const fs = require('node:fs');
|
||||
const got = require('got');
|
||||
const path = require('node:path');
|
||||
|
||||
const { handleGitCall, ELECTRON_DIR } = require('./lib/utils.js');
|
||||
const { Octokit } = require('@octokit/rest');
|
||||
|
||||
const octokit = new Octokit();
|
||||
|
||||
const APPVEYOR_IMAGES_URL = 'https://ci.appveyor.com/api/build-clouds';
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
const { appCredentialsFromString, getTokenForRepo } = require('@electron/github-app-auth');
|
||||
|
||||
const cp = require('node:child_process');
|
||||
|
||||
async function main () {
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import { parseArgs } from 'node:util';
|
||||
|
||||
import { cleanReleaseArtifacts } from '../release-artifact-cleanup';
|
||||
|
||||
const { values: { tag: _tag, releaseID } } = parseArgs({
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
import { Octokit } from '@octokit/rest';
|
||||
import * as childProcess from 'node:child_process';
|
||||
import * as fs from 'node:fs';
|
||||
import * as path from 'node:path';
|
||||
import * as semver from 'semver';
|
||||
import * as temp from 'temp';
|
||||
|
||||
import { getCurrentBranch, ELECTRON_DIR } from '../../lib/utils';
|
||||
import { getElectronVersion } from '../../lib/get-version';
|
||||
import * as childProcess from 'node:child_process';
|
||||
import * as fs from 'node:fs';
|
||||
import * as path from 'node:path';
|
||||
|
||||
import { getElectronVersion } from '../../lib/get-version';
|
||||
import { getCurrentBranch, ELECTRON_DIR } from '../../lib/utils';
|
||||
import { getAssetContents } from '../get-asset';
|
||||
import { createGitHubTokenStrategy } from '../github-token';
|
||||
import { ELECTRON_ORG, ELECTRON_REPO, ElectronReleaseRepo, NIGHTLY_REPO } from '../types';
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import { Octokit } from '@octokit/rest';
|
||||
|
||||
import { createGitHubTokenStrategy } from './github-token';
|
||||
import { ELECTRON_ORG, ELECTRON_REPO, ElectronReleaseRepo, NIGHTLY_REPO } from './types';
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import { Octokit } from '@octokit/rest';
|
||||
import got from 'got';
|
||||
|
||||
import { createGitHubTokenStrategy } from './github-token';
|
||||
import { ELECTRON_ORG, ElectronReleaseRepo } from './types';
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import got from 'got';
|
||||
|
||||
import * as url from 'node:url';
|
||||
|
||||
const HASHER_FUNCTION_HOST = 'electron-artifact-hasher.azurewebsites.net';
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
#!/usr/bin/env node
|
||||
|
||||
import { Octokit } from '@octokit/rest';
|
||||
import { GitProcess } from 'dugite';
|
||||
import { basename } from 'node:path';
|
||||
import { valid, compare, gte, lte } from 'semver';
|
||||
|
||||
import { ELECTRON_DIR } from '../../lib/utils';
|
||||
import { get, render } from './notes';
|
||||
|
||||
import { Octokit } from '@octokit/rest';
|
||||
import { createGitHubTokenStrategy } from '../github-token';
|
||||
import { basename } from 'node:path';
|
||||
import { parseArgs } from 'node:util';
|
||||
|
||||
import { get, render } from './notes';
|
||||
import { ELECTRON_DIR } from '../../lib/utils';
|
||||
import { createGitHubTokenStrategy } from '../github-token';
|
||||
import { ELECTRON_ORG, ELECTRON_REPO } from '../types';
|
||||
|
||||
const octokit = new Octokit({
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
#!/usr/bin/env node
|
||||
|
||||
import { existsSync, readFileSync, writeFileSync, mkdirSync } from 'node:fs';
|
||||
import { resolve as _resolve } from 'node:path';
|
||||
|
||||
import { Octokit } from '@octokit/rest';
|
||||
import { GitProcess } from 'dugite';
|
||||
|
||||
import { existsSync, readFileSync, writeFileSync, mkdirSync } from 'node:fs';
|
||||
import { resolve as _resolve } from 'node:path';
|
||||
|
||||
import { ELECTRON_DIR } from '../../lib/utils';
|
||||
import { createGitHubTokenStrategy } from '../github-token';
|
||||
import { ELECTRON_ORG, ELECTRON_REPO } from '../types';
|
||||
|
|
|
@ -1,14 +1,15 @@
|
|||
import { Octokit } from '@octokit/rest';
|
||||
import * as chalk from 'chalk';
|
||||
import { GitProcess } from 'dugite';
|
||||
|
||||
import { execSync } from 'node:child_process';
|
||||
import { join } from 'node:path';
|
||||
|
||||
import { runReleaseCIJobs } from './run-release-ci-jobs';
|
||||
import releaseNotesGenerator from './notes';
|
||||
import { getCurrentBranch, ELECTRON_DIR } from '../lib/utils.js';
|
||||
import { createGitHubTokenStrategy } from './github-token';
|
||||
import releaseNotesGenerator from './notes';
|
||||
import { runReleaseCIJobs } from './run-release-ci-jobs';
|
||||
import { ELECTRON_ORG, ElectronReleaseRepo, VersionBumpType } from './types';
|
||||
import { getCurrentBranch, ELECTRON_DIR } from '../lib/utils.js';
|
||||
|
||||
const pass = chalk.green('✓');
|
||||
const fail = chalk.red('✗');
|
||||
|
|
|
@ -4,17 +4,18 @@ import { BlobServiceClient } from '@azure/storage-blob';
|
|||
import { Octokit } from '@octokit/rest';
|
||||
import * as chalk from 'chalk';
|
||||
import got from 'got';
|
||||
import { execSync, ExecSyncOptions } from 'node:child_process';
|
||||
import { statSync, createReadStream, writeFileSync, close } from 'node:fs';
|
||||
import { join } from 'node:path';
|
||||
import { gte } from 'semver';
|
||||
import { track as trackTemp } from 'temp';
|
||||
|
||||
import { ELECTRON_DIR } from '../lib/utils';
|
||||
import { getElectronVersion } from '../lib/get-version';
|
||||
import { execSync, ExecSyncOptions } from 'node:child_process';
|
||||
import { statSync, createReadStream, writeFileSync, close } from 'node:fs';
|
||||
import { join } from 'node:path';
|
||||
|
||||
import { getUrlHash } from './get-url-hash';
|
||||
import { createGitHubTokenStrategy } from './github-token';
|
||||
import { ELECTRON_ORG, ELECTRON_REPO, ElectronReleaseRepo, NIGHTLY_REPO } from './types';
|
||||
import { getElectronVersion } from '../lib/get-version';
|
||||
import { ELECTRON_DIR } from '../lib/utils';
|
||||
|
||||
const temp = trackTemp();
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import { Octokit } from '@octokit/rest';
|
||||
import got, { OptionsOfTextResponseBody } from 'got';
|
||||
|
||||
import * as assert from 'node:assert';
|
||||
|
||||
import { createGitHubTokenStrategy } from './github-token';
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
import { Octokit } from '@octokit/rest';
|
||||
|
||||
import * as fs from 'node:fs';
|
||||
|
||||
import { createGitHubTokenStrategy } from '../github-token';
|
||||
import { ELECTRON_ORG, ELECTRON_REPO, ElectronReleaseRepo, NIGHTLY_REPO } from '../types';
|
||||
|
||||
|
|
|
@ -2,7 +2,9 @@
|
|||
|
||||
import { valid, coerce, inc } from 'semver';
|
||||
|
||||
import { getElectronVersion } from '../lib/get-version';
|
||||
import { parseArgs } from 'node:util';
|
||||
|
||||
import { VersionBumpType } from './types';
|
||||
import {
|
||||
isNightly,
|
||||
isAlpha,
|
||||
|
@ -12,8 +14,7 @@ import {
|
|||
nextBeta,
|
||||
isStable
|
||||
} from './version-utils';
|
||||
import { VersionBumpType } from './types';
|
||||
import { parseArgs } from 'node:util';
|
||||
import { getElectronVersion } from '../lib/get-version';
|
||||
|
||||
// run the script
|
||||
async function main () {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import * as semver from 'semver';
|
||||
import { GitProcess } from 'dugite';
|
||||
import * as semver from 'semver';
|
||||
|
||||
import { ELECTRON_DIR } from '../lib/utils';
|
||||
|
||||
|
|
|
@ -1,13 +1,14 @@
|
|||
import * as childProcess from 'node:child_process';
|
||||
import * as fs from 'node:fs';
|
||||
import * as minimist from 'minimist';
|
||||
import * as os from 'node:os';
|
||||
import * as path from 'node:path';
|
||||
import * as streamChain from 'stream-chain';
|
||||
import * as streamJson from 'stream-json';
|
||||
import { ignore as streamJsonIgnore } from 'stream-json/filters/Ignore';
|
||||
import { streamArray as streamJsonStreamArray } from 'stream-json/streamers/StreamArray';
|
||||
|
||||
import * as childProcess from 'node:child_process';
|
||||
import * as fs from 'node:fs';
|
||||
import * as os from 'node:os';
|
||||
import * as path from 'node:path';
|
||||
|
||||
import { chunkFilenames, findMatchingFiles } from './lib/utils';
|
||||
|
||||
const SOURCE_ROOT = path.normalize(path.dirname(__dirname));
|
||||
|
|
|
@ -1,19 +1,23 @@
|
|||
#!/usr/bin/env node
|
||||
|
||||
const { ElectronVersions, Installer } = require('@electron/fiddle-core');
|
||||
|
||||
const chalk = require('chalk');
|
||||
const { hashElement } = require('folder-hash');
|
||||
const minimist = require('minimist');
|
||||
|
||||
const childProcess = require('node:child_process');
|
||||
const crypto = require('node:crypto');
|
||||
const fs = require('node:fs');
|
||||
const { hashElement } = require('folder-hash');
|
||||
const os = require('node:os');
|
||||
const path = require('node:path');
|
||||
|
||||
const unknownFlags = [];
|
||||
|
||||
const pass = chalk.green('✓');
|
||||
const fail = chalk.red('✗');
|
||||
|
||||
const args = require('minimist')(process.argv, {
|
||||
const args = minimist(process.argv, {
|
||||
string: ['runners', 'target', 'electronVersion'],
|
||||
unknown: arg => unknownFlags.push(arg)
|
||||
});
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
const fs = require('node:fs');
|
||||
const glob = require('glob');
|
||||
|
||||
const fs = require('node:fs');
|
||||
|
||||
const currentShard = parseInt(process.argv[2], 10);
|
||||
const shardCount = parseInt(process.argv[3], 10);
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
const cp = require('node:child_process');
|
||||
|
||||
const utils = require('./lib/utils');
|
||||
|
||||
const electronPath = utils.getAbsoluteElectronExec();
|
||||
|
||||
const child = cp.spawn(electronPath, process.argv.slice(2), { stdio: 'inherit' });
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue