Skip to content

Commit 4137d32

Browse files
committed
style(errors): fix lint
1 parent 62f43e7 commit 4137d32

File tree

1 file changed

+7
-28
lines changed
  • packages/mongodb-memory-server-core/src/util

1 file changed

+7
-28
lines changed

packages/mongodb-memory-server-core/src/util/errors.ts

+7-28
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
import { isNullOrUndefined } from './utils';
22

33
export class StateError extends Error {
4-
constructor(
5-
public wantedStates: string[],
6-
public gotState: string
7-
) {
4+
constructor(public wantedStates: string[], public gotState: string) {
85
super(
96
`Incorrect State for operation: "${gotState}", allowed States: "[${wantedStates.join(
107
','
@@ -22,10 +19,7 @@ export class UnknownLockfileStatusError extends Error {
2219
}
2320

2421
export class UnableToUnlockLockfileError extends Error {
25-
constructor(
26-
public thisInstance: boolean,
27-
public file: string
28-
) {
22+
constructor(public thisInstance: boolean, public file: string) {
2923
super(
3024
`Cannot unlock file "${file}", because it is not locked by this ${
3125
thisInstance ? 'instance' : 'process'
@@ -41,10 +35,7 @@ export class UnknownPlatformError extends Error {
4135
}
4236

4337
export class UnknownArchitectureError extends Error {
44-
constructor(
45-
public arch: string,
46-
public platform?: string
47-
) {
38+
constructor(public arch: string, public platform?: string) {
4839
super();
4940

5041
if (!isNullOrUndefined(platform)) {
@@ -56,10 +47,7 @@ export class UnknownArchitectureError extends Error {
5647
}
5748

5849
export class WaitForPrimaryTimeoutError extends Error {
59-
constructor(
60-
public timeout: number,
61-
public where?: string
62-
) {
50+
constructor(public timeout: number, public where?: string) {
6351
super(`Timed out after ${timeout}ms while waiting for a Primary (where: "${where}")`);
6452
}
6553
}
@@ -88,10 +76,7 @@ export class NoSystemBinaryFoundError extends Error {
8876
}
8977

9078
export class Md5CheckFailedError extends Error {
91-
constructor(
92-
public binarymd5: string,
93-
public checkfilemd5: string
94-
) {
79+
constructor(public binarymd5: string, public checkfilemd5: string) {
9580
super(`MD5 check failed! Binary MD5 is "${binarymd5}", Checkfile MD5 is "${checkfilemd5}"`);
9681
}
9782
}
@@ -154,10 +139,7 @@ export class ParseArchiveRegexError extends Error {
154139
}
155140

156141
export class NoRegexMatchError extends Error {
157-
constructor(
158-
public name: string,
159-
public extra?: string
160-
) {
142+
constructor(public name: string, public extra?: string) {
161143
super();
162144
const addExtra = !!extra ? `(${extra})` : '';
163145
this.message = `Expected "${name}" to have Regex Matches${addExtra}`;
@@ -222,10 +204,7 @@ export class UnknownVersionError extends Error {
222204
* Error for when downloading fails
223205
*/
224206
export class DownloadError extends Error {
225-
constructor(
226-
public url: string,
227-
public msg: string
228-
) {
207+
constructor(public url: string, public msg: string) {
229208
super(`Download failed for url \"${url}\", Details:\n${msg}`);
230209
}
231210
}

0 commit comments

Comments
 (0)