diff --git a/scripts/scripts_manager.js b/scripts/scripts_manager.js index 93c9d5e00..4b82ee9a4 100644 --- a/scripts/scripts_manager.js +++ b/scripts/scripts_manager.js @@ -59,16 +59,16 @@ const buildCommand = new Command('build') * @returns {Promise} */ function runJest(patterns) { - const [args, filePatterns] = _.partition(patterns ?? [], (arg) => arg.startsWith('-')); + const [args, filePatterns] = _.partition(patterns ?? [], arg => arg.startsWith('-')); // command.args automatically includes the source directory option // which is not supported by Jest, so we need to remove it - const toRemove = args.findIndex((arg) => arg.startsWith('--srcDir')); + const toRemove = args.findIndex(arg => arg.startsWith('--srcDir')); if (toRemove !== -1) { args.splice(toRemove, 1); } - const jestArgs = args.concat(filePatterns.map((pattern) => pattern.split(pathlib.win32.sep) + const jestArgs = args.concat(filePatterns.map(pattern => pattern.split(pathlib.win32.sep) .join(pathlib.posix.sep))); return jest.run(jestArgs, './scripts/jest.config.js'); diff --git a/scripts/src/build/__tests__/buildUtils.test.ts b/scripts/src/build/__tests__/buildUtils.test.ts index dce466ea7..eb759e40c 100644 --- a/scripts/src/build/__tests__/buildUtils.test.ts +++ b/scripts/src/build/__tests__/buildUtils.test.ts @@ -4,8 +4,8 @@ describe('Test retrieveBundlesAndTabs', () => { type TestCase = [ desc: string, { - bundles?: string[] | null - tabs?: string[] | null + bundles?: string[] | null; + tabs?: string[] | null; }, boolean, Awaited> diff --git a/scripts/src/build/docs/html.ts b/scripts/src/build/docs/html.ts index 8594bed41..803afbf13 100644 --- a/scripts/src/build/docs/html.ts +++ b/scripts/src/build/docs/html.ts @@ -5,10 +5,10 @@ import type { AwaitedReturn } from '../utils'; import { initTypedoc, type TypedocResult } from './docsUtils'; export type HtmlResult = { - severity: 'error' | 'warn' - error: any + severity: 'error' | 'warn'; + error: any; } | { - severity: 'success' + severity: 'success'; }; export const buildHtml = wrapWithTimer(async ( diff --git a/scripts/src/build/prebuild/lint.ts b/scripts/src/build/prebuild/lint.ts index 2e4f3669c..a8fc9e08b 100644 --- a/scripts/src/build/prebuild/lint.ts +++ b/scripts/src/build/prebuild/lint.ts @@ -12,12 +12,12 @@ import { findSeverity, divideAndRound, type Severity, type AwaitedReturn } from import { createPrebuildCommand, createPrebuildCommandHandler, type PrebuildOptions } from './utils'; interface LintResults { - formatted: string - severity: Severity + formatted: string; + severity: Severity; } interface LintOptions extends Omit { - fix?: boolean + fix?: boolean; } export const runEslint = wrapWithTimer(async ({ bundles, tabs, srcDir, fix }: LintOptions): Promise => { diff --git a/scripts/src/build/prebuild/tsc.ts b/scripts/src/build/prebuild/tsc.ts index 0e7e9d310..1606e3f81 100644 --- a/scripts/src/build/prebuild/tsc.ts +++ b/scripts/src/build/prebuild/tsc.ts @@ -7,21 +7,21 @@ import { expandBundleNames, expandTabNames, divideAndRound, type AwaitedReturn } import { createPrebuildCommand, createPrebuildCommandHandler, type PrebuildOptions } from './utils'; type TsconfigResult = { - severity: 'error', - results?: ts.Diagnostic[] - error?: any + severity: 'error'; + results?: ts.Diagnostic[]; + error?: any; } | { - severity: 'success', - results: ts.CompilerOptions + severity: 'success'; + results: ts.CompilerOptions; }; type TscResult = { - severity: 'error' - results?: ts.Diagnostic[] - error?: any + severity: 'error'; + results?: ts.Diagnostic[]; + error?: any; } | { - severity: 'success', - results: ts.Diagnostic[] + severity: 'success'; + results: ts.Diagnostic[]; }; async function getTsconfig(srcDir: string): Promise { diff --git a/scripts/src/build/utils.ts b/scripts/src/build/utils.ts index 439b153ea..79e204e6d 100644 --- a/scripts/src/build/utils.ts +++ b/scripts/src/build/utils.ts @@ -8,30 +8,30 @@ import { htmlLogger, type buildHtml } from './docs/html'; import prebuild, { formatPrebuildResults } from './prebuild'; export interface BuildOptions { - srcDir: string - outDir: string - manifest: string - lint?: boolean - fix?: boolean - tsc?: boolean - verbose?: boolean + srcDir: string; + outDir: string; + manifest: string; + lint?: boolean; + fix?: boolean; + tsc?: boolean; + verbose?: boolean; } export interface SuccessResult { - name: string - severity: 'success', + name: string; + severity: 'success'; } export interface WarnResult { - name: string, - severity: 'warn', - error: any + name: string; + severity: 'warn'; + error: any; } export interface ErrorResult { - name: string, - severity: 'error', - error: any + name: string; + severity: 'error'; + error: any; } export type OperationResult = ErrorResult | SuccessResult | WarnResult; @@ -194,7 +194,7 @@ export function logInputs( return output.join('\n'); } -type CommandHandler = (opts: BuildOptions & { bundles?: string[] | null, tabs?: string[] | null }) => Promise; +type CommandHandler = (opts: BuildOptions & { bundles?: string[] | null; tabs?: string[] | null }) => Promise; export function createBuildCommandHandler(func: BuildTask, ignore?: 'bundles' | 'tabs'): CommandHandler { return async opts => { diff --git a/scripts/src/commandUtils.ts b/scripts/src/commandUtils.ts index 8ae4498ef..6022e1666 100644 --- a/scripts/src/commandUtils.ts +++ b/scripts/src/commandUtils.ts @@ -41,8 +41,8 @@ export function promiseAll[]>(...args: T): Promise<{ [K i } export interface TimedResult { - result: T - elapsed: number + result: T; + elapsed: number; } export function wrapWithTimer Promise>(func: T) {