style: fix linting issues

This commit is contained in:
Ben Heidemann 2021-04-10 12:18:56 +01:00 committed by David Humphrey
parent e82374ae2b
commit ea5e48b48b
3 changed files with 12 additions and 14 deletions

View File

@ -33,14 +33,14 @@ module.exports = class FilerWebpackPlugin {
// Apply fs, path and buffer shims if required
switch (resolveData.request) {
case 'fs':
if (!this.options.shimFs) return;
return this.applyFsShim(resolveData);
case 'path':
if (!this.options.shimPath) return;
return this.applyPathShim(resolveData);
default:
return;
case 'fs':
if (!this.options.shimFs) return;
return this.applyFsShim(resolveData);
case 'path':
if (!this.options.shimPath) return;
return this.applyPathShim(resolveData);
default:
return;
}
}
);

View File

@ -168,7 +168,7 @@ function createMockFn(implementation = undefined) {
if (typeof implementation === 'function') {
return implementation(...args);
}
}
};
Object.defineProperty(mockFn, 'calls', {
get() {
return calls;

View File

@ -15,7 +15,7 @@ function createNMFResolveCompilerObject(resolveData) {
tap: normalModuleFactory_resolve_tap
}
}
}
};
const normalModuleFactory_tap = utils.createMockFn(function (name, callback) {
callback(normalModuleFactory);
@ -27,13 +27,13 @@ function createNMFResolveCompilerObject(resolveData) {
tap: normalModuleFactory_tap,
}
}
}
};
return {
compiler,
normalModuleFactory_tap,
normalModuleFactory_resolve_tap,
}
};
}
describe.only('path shim', () => {
@ -324,8 +324,6 @@ describe.only('path shim', () => {
// Mocks
const {
compiler,
normalModuleFactory_tap,
normalModuleFactory_resolve_tap,
} = createNMFResolveCompilerObject(resolveDataIn);
// Act