Skip to content

Commit 4780120

Browse files
committed
Autofix a bunch of issues
1 parent 84b36d5 commit 4780120

40 files changed

+260
-195
lines changed

babel.config.cjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module.exports = {
44
env: {
55
test: {
66
presets: ['@babel/preset-env', '@babel/preset-typescript'],
7-
plugins: ['@babel/plugin-transform-modules-commonjs']
8-
}
9-
}
7+
plugins: ['@babel/plugin-transform-modules-commonjs'],
8+
},
9+
},
1010
};

jest.config.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ module.exports = {
217217

218218
// A map from regular expressions to paths to transformers
219219
transform: {
220-
"\\.[jt]sx?$": "babel-jest"
220+
'\\.[jt]sx?$': 'babel-jest',
221221
},
222222

223223
// An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation

src/command-line-arguments.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import yargs from 'yargs/yargs';
21
import { hideBin } from 'yargs/helpers';
2+
import yargs from 'yargs/yargs';
33

44
export type CommandLineArguments = {
55
projectDirectory: string;

src/editor.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { when } from 'jest-when';
2+
23
import { determineEditor } from './editor.js';
34
import * as envModule from './env.js';
45
import * as miscUtils from './misc-utils.js';

src/editor.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ import { debug, resolveExecutable } from './misc-utils.js';
44
/**
55
* Information about the editor present on the user's computer.
66
*
7-
* @property path - The path to the executable representing the editor.
8-
* @property args - Command-line arguments to pass to the executable when
7+
* path - The path to the executable representing the editor.
8+
*
9+
* args - Command-line arguments to pass to the executable when
910
* calling it.
1011
*/
1112
export type Editor = {

src/fs.test.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1+
import * as actionUtils from '@metamask/action-utils';
12
import fs from 'fs';
3+
import { when } from 'jest-when';
24
import path from 'path';
35
import { rimraf } from 'rimraf';
4-
import { when } from 'jest-when';
5-
import * as actionUtils from '@metamask/action-utils';
6-
import { withSandbox } from '../tests/helpers.js';
6+
77
import {
88
readFile,
99
writeFile,
@@ -13,6 +13,7 @@ import {
1313
ensureDirectoryPathExists,
1414
removeFile,
1515
} from './fs.js';
16+
import { withSandbox } from '../tests/helpers.js';
1617

1718
jest.mock('@metamask/action-utils');
1819

src/fs.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
import fs from 'fs';
21
import {
32
readJsonObjectFile as underlyingReadJsonObjectFile,
43
writeJsonFile as underlyingWriteJsonFile,
54
} from '@metamask/action-utils';
5+
import fs from 'fs';
6+
67
import { wrapError, isErrorWithCode } from './misc-utils.js';
78

89
/**

src/initial-parameters.test.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
1+
import { when } from 'jest-when';
12
import os from 'os';
23
import path from 'path';
3-
import { when } from 'jest-when';
4+
5+
import * as commandLineArgumentsModule from './command-line-arguments.js';
6+
import * as envModule from './env.js';
7+
import { determineInitialParameters } from './initial-parameters.js';
8+
import * as projectModule from './project.js';
49
import {
510
buildMockProject,
611
buildMockPackage,
712
createNoopWriteStream,
813
} from '../tests/unit/helpers.js';
9-
import { determineInitialParameters } from './initial-parameters.js';
10-
import * as commandLineArgumentsModule from './command-line-arguments.js';
11-
import * as envModule from './env.js';
12-
import * as projectModule from './project.js';
1314

1415
jest.mock('./command-line-arguments');
1516
jest.mock('./env');

src/initial-parameters.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
import os from 'os';
22
import path from 'path';
3+
34
import { readCommandLineArguments } from './command-line-arguments.js';
4-
import { WriteStreamLike } from './fs.js';
5-
import { readProject, Project } from './project.js';
5+
import type { WriteStreamLike } from './fs.js';
6+
import type { Project } from './project.js';
7+
import { readProject } from './project.js';
68

79
/**
810
* The type of release being created as determined by the parent release.

src/main.test.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import fs from 'fs';
2-
import { buildMockProject } from '../tests/unit/helpers.js';
3-
import { main } from './main.js';
2+
43
import * as initialParametersModule from './initial-parameters.js';
4+
import { main } from './main.js';
55
import * as monorepoWorkflowOperations from './monorepo-workflow-operations.js';
6+
import { buildMockProject } from '../tests/unit/helpers.js';
67

78
jest.mock('./initial-parameters');
89
jest.mock('./monorepo-workflow-operations');

0 commit comments

Comments
 (0)