Skip to content

Commit ed479cd

Browse files
committed
chore(deps): fix lint errors
1 parent 5cd6da6 commit ed479cd

File tree

5 files changed

+14
-5
lines changed

5 files changed

+14
-5
lines changed

apps/generator-cli/src/app/services/generator.service.spec.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,14 @@ jest.mock('fs-extra');
88
jest.mock('glob');
99
jest.mock('concurrently');
1010
// eslint-disable-next-line @typescript-eslint/no-var-requires
11-
const fs = jest.mocked(require('fs-extra'));
11+
import fsExtra from 'fs-extra';
12+
const fs = jest.mocked(fsExtra);
1213
// eslint-disable-next-line @typescript-eslint/no-var-requires
13-
const glob = jest.mocked(require('glob'));
14+
import globImport from 'glob';
15+
const glob = jest.mocked(globImport);
1416
// eslint-disable-next-line @typescript-eslint/no-var-requires
15-
const concurrently = jest.mocked(require('concurrently'));
17+
import concurrentlyImport from 'concurrently';
18+
const concurrently = jest.mocked(concurrentlyImport);
1619

1720
describe('GeneratorService', () => {
1821
let fixture: GeneratorService;

apps/generator-cli/src/app/services/pass-through.service.spec.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ import { ConfigService } from './config.service';
99

1010
jest.mock('child_process');
1111
// eslint-disable-next-line @typescript-eslint/no-var-requires
12-
const childProcess = jest.mocked(require('child_process'));
12+
import childProcessImport from 'child_process';
13+
const childProcess = jest.mocked(childProcessImport);
1314

1415
describe('PassThroughService', () => {
1516
let fixture: PassThroughService;
@@ -286,6 +287,7 @@ describe('PassThroughService', () => {
286287
expect(spy).toHaveBeenCalledTimes(helpText ? 1 : 0);
287288
});
288289

290+
// eslint-disable-next-line no-unused-expressions
289291
helpText &&
290292
it('prints the correct help text', () => {
291293
expect(spy).toHaveBeenCalledWith(helpText());
@@ -299,6 +301,7 @@ describe('PassThroughService', () => {
299301
);
300302
});
301303

304+
// eslint-disable-next-line no-unused-expressions
302305
spawn &&
303306
it('spawns the correct process', () => {
304307
expect(childProcess.spawn).toHaveBeenNthCalledWith(

apps/generator-cli/src/app/services/pass-through.service.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ export class PassThroughService {
124124
private run = (subCmd: string) =>
125125
new Promise<string>((resolve, reject) => {
126126
exec(`${this.cmd()} ${subCmd}`, (error, stdout, stderr) => {
127+
// eslint-disable-next-line no-unused-expressions
127128
error ? reject(new Error(stderr)) : resolve(stdout);
128129
});
129130
});

apps/generator-cli/src/app/services/version-manager.service.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ import * as path from 'path';
1313
jest.mock('fs-extra');
1414

1515
// eslint-disable-next-line @typescript-eslint/no-var-requires
16-
const fs = jest.mocked(require('fs-extra'));
16+
import fsExtra from 'fs-extra';
17+
const fs = jest.mocked(fsExtra);
1718

1819
describe('VersionManagerService', () => {
1920
let fixture: VersionManagerService;

apps/generator-cli/src/app/services/version-manager.service.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,7 @@ export class VersionManagerService {
279279
} catch(e) {
280280
// simply show the original error if the above code block fails
281281
this.logger.log('Errors: ', error);
282+
this.logger.debug('Caught errors: ', e);
282283
}
283284
}
284285

0 commit comments

Comments
 (0)