Skip to content

Commit

Permalink
fix: warning free lint
Browse files Browse the repository at this point in the history
  • Loading branch information
erights committed Jun 30, 2023
1 parent 5ede1b3 commit a20ee00
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 10 deletions.
2 changes: 1 addition & 1 deletion packages/eventual-send/src/handled-promise.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ export const makeHandledPromise = () => {
}
}

assert.fail(
throw assert.fail(
X`${q(handlerName)} is defined but has no methods needed for ${q(
operation,
)} (has ${q(getMethodNames(handler))})`,
Expand Down
2 changes: 1 addition & 1 deletion packages/init/src/node-async_hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ const findAsyncSymbolsFromPromiseCreateHook = () => {
type = 'destroyed';
} else {
// process._rawDebug(`Unexpected symbol`, symbol);
return;
return undefined;
}

if (setAsyncSymbol(type, symbol)) {
Expand Down
2 changes: 1 addition & 1 deletion packages/marshal/src/deeplyFulfilled.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export const deeplyFulfilled = async val => {
return E.when(val, nonp => deeplyFulfilled(nonp));
}
default: {
assert.fail(X`Unexpected passStyle ${q(passStyle)}`, TypeError);
throw assert.fail(X`Unexpected passStyle ${q(passStyle)}`, TypeError);
}
}
};
Expand Down
7 changes: 5 additions & 2 deletions packages/marshal/src/encodeToCapData.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ export const makeEncodeToCapData = (encodeOptions = {}) => {
)}: ${encoded}`;
}
default: {
assert.fail(
throw assert.fail(
X`internal: Unrecognized passStyle ${q(passStyle)}`,
TypeError,
);
Expand Down Expand Up @@ -446,7 +446,10 @@ export const makeDecodeFromCapData = (decodeOptions = {}) => {
)}`;
}
default: {
assert.fail(X`unrecognized ${q(QCLASS)} ${q(qclass)}`, TypeError);
throw assert.fail(
X`unrecognized ${q(QCLASS)} ${q(qclass)}`,
TypeError,
);
}
}
} else {
Expand Down
9 changes: 6 additions & 3 deletions packages/marshal/src/encodeToSmallcaps.js
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ export const makeEncodeToSmallcaps = (encodeOptions = {}) => {
return result;
}
default: {
assert.fail(
throw assert.fail(
X`internal: Unrecognized passStyle ${q(passStyle)}`,
TypeError,
);
Expand Down Expand Up @@ -372,7 +372,10 @@ export const makeDecodeFromSmallcaps = (decodeOptions = {}) => {
return -Infinity;
}
default: {
assert.fail(X`unknown constant "${q(encoding)}"`, TypeError);
throw assert.fail(
X`unknown constant "${q(encoding)}"`,
TypeError,
);
}
}
}
Expand Down Expand Up @@ -454,7 +457,7 @@ export const makeDecodeFromSmallcaps = (decodeOptions = {}) => {
return fromEntries(decodedEntries);
}
default: {
assert.fail(
throw assert.fail(
X`internal: unrecognized JSON typeof ${q(
typeof encoding,
)}: ${encoding}`,
Expand Down
5 changes: 4 additions & 1 deletion packages/marshal/src/marshal-justin.js
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,10 @@ const decodeToJustin = (encoding, shouldIndent = false, slots = []) => {
}

default: {
assert.fail(X`unrecognized ${q(QCLASS)} ${q(qclass)}`, TypeError);
throw assert.fail(
X`unrecognized ${q(QCLASS)} ${q(qclass)}`,
TypeError,
);
}
}
} else if (isArray(rawTree)) {
Expand Down
2 changes: 1 addition & 1 deletion packages/pass-style/src/passStyleOf.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ const makePassStyleOf = passStyleHelpers => {
return 'remotable';
}
default: {
assert.fail(X`Unrecognized typeof ${q(typestr)}`, TypeError);
throw assert.fail(X`Unrecognized typeof ${q(typestr)}`, TypeError);
}
}
};
Expand Down

0 comments on commit a20ee00

Please sign in to comment.