Skip to content

Commit 79bd4da

Browse files
NathanaelAFatme
authored andcommitted
TSLint fixes
1 parent 8e5ce67 commit 79bd4da

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

lib/services/pacote-service.ts

-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ export class PacoteService implements IPacoteService {
2727
this.$logger.trace(`Calling pacoteService.manifest for packageName: '${packageName}' and options: ${options}`);
2828
const manifestOptions: IPacoteBaseOptions = await this.getPacoteBaseOptions();
2929

30-
3130
if (options) {
3231
_.extend(manifestOptions, options);
3332
}

test/services/pacote-service.ts

+10-10
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,15 @@ interface ITestCase extends ITestSetup {
3939
}
4040

4141
function createPacoteOptions(source: Object): Object {
42-
let options: { [index: string]: any } = {};
42+
const options: { [index: string]: any } = {};
4343
npmconfig.read().forEach((value: any, key: string) => {
4444
// replace env ${VARS} in strings with the process.env value
4545
options[key] = typeof value !== 'string' ? value : value.replace(/\${([^}]+)}/, (_, envVar) => process.env[envVar] );
4646
});
4747

4848
// Copy any original source keys over our defaults
49-
for (let key in source) {
50-
options[key] = source[key];
49+
for (const key in source) {
50+
options[key] = source[key];
5151
}
5252
return options;
5353
}
@@ -121,13 +121,13 @@ describe("pacoteService", () => {
121121
const testInjector = createTestInjector(opts);
122122

123123
if (opts.isLocalPackage) {
124-
const oldPath = path.resolve;
125-
sandboxInstance.stub(path, "resolve").callsFake((value:string) => {
126-
if (value === packageName) {
127-
return fullPath;
128-
}
129-
return oldPath(value);
130-
});
124+
const oldPath = path.resolve;
125+
sandboxInstance.stub(path, "resolve").callsFake((value:string) => {
126+
if (value === packageName) {
127+
return fullPath;
128+
}
129+
return oldPath(value);
130+
});
131131
}
132132

133133
return testInjector.resolve<IPacoteService>("pacoteService");

0 commit comments

Comments
 (0)