Skip to content

Commit

Permalink
style: trivial changes to make lint happy (#1218)
Browse files Browse the repository at this point in the history
  • Loading branch information
erights committed Jun 15, 2022
1 parent 35d9489 commit 94c16f9
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion packages/compartment-mapper/src/compartment-map.js
Expand Up @@ -467,6 +467,7 @@ const assertEntry = (allegedEntry, url) => {
* @param {string} [url]
* @returns {asserts compartmentMap is import('./types.js').CompartmentMapDescriptor}
*/

export const assertCompartmentMap = (
allegedCompartmentMap,
url = '<unknown-compartment-map.json>',
Expand All @@ -488,5 +489,4 @@ export const assertCompartmentMap = (
assertTags(tags, url);
assertEntry(entry, url);
assertCompartments(compartments, url);
return undefined;
};
Expand Up @@ -20,6 +20,7 @@ const noTrailingSlash = path => {

/**
* Generates values for __filename and __dirname from location
*
* @param {ReadPowers | ReadFn | undefined} readPowers
* @param {string} location
* @returns {{
Expand Down
6 changes: 3 additions & 3 deletions packages/marshal/src/typeGuards.js
Expand Up @@ -49,7 +49,7 @@ harden(isRemotable);
/** @type {AssertArray} */
const assertCopyArray = (array, optNameOfArray = 'Alleged array') => {
const passStyle = passStyleOf(array);
return assert(
assert(
passStyle === 'copyArray',
X`${q(optNameOfArray)} ${array} must be a pass-by-copy array, not ${q(
passStyle,
Expand All @@ -68,7 +68,7 @@ harden(assertCopyArray);
/** @type {AssertRecord} */
const assertRecord = (record, optNameOfRecord = 'Alleged record') => {
const passStyle = passStyleOf(record);
return assert(
assert(
passStyle === 'copyRecord',
X`${q(optNameOfRecord)} ${record} must be a pass-by-copy record, not ${q(
passStyle,
Expand All @@ -90,7 +90,7 @@ const assertRemotable = (
optNameOfRemotable = 'Alleged remotable',
) => {
const passStyle = passStyleOf(remotable);
return assert(
assert(
passStyle === 'remotable',
X`${q(optNameOfRemotable)} ${remotable} must be a remotable, not ${q(
passStyle,
Expand Down
16 changes: 8 additions & 8 deletions packages/ses/src/transforms.js
Expand Up @@ -93,8 +93,8 @@ export const rejectHtmlComments = src => {
* not change the meaning of the program because it only changes the contents of
* those comments.
*
* @param { string } src
* @returns { string }
* @param {string} src
* @returns {string}
*/
export const evadeHtmlCommentTest = src => {
const replaceFn = match => (match[0] === '<' ? '< ! --' : '-- >');
Expand Down Expand Up @@ -135,8 +135,8 @@ const importPattern = new FERAL_REG_EXP(
* something like that from something like importnotreally('power.js') which
* is perfectly safe.
*
* @param { string } src
* @returns { string }
* @param {string} src
* @returns {string}
*/
export const rejectImportExpressions = src => {
const lineNumber = getLineNumber(src, importPattern);
Expand All @@ -162,8 +162,8 @@ export const rejectImportExpressions = src => {
* the meaning of the program, depending on the binding, if any, of the lexical
* variable `__import__`.
*
* @param { string } src
* @returns { string }
* @param {string} src
* @returns {string}
*/
export const evadeImportExpressionTest = src => {
const replaceFn = (_, p1, p2) => `${p1}__import__${p2}`;
Expand Down Expand Up @@ -206,8 +206,8 @@ const someDirectEvalPattern = new FERAL_REG_EXP(
*
* Exported for unit tests.
*
* @param { string } src
* @returns { string }
* @param {string} src
* @returns {string}
*/
export const rejectSomeDirectEvalExpressions = src => {
const lineNumber = getLineNumber(src, someDirectEvalPattern);
Expand Down

0 comments on commit 94c16f9

Please sign in to comment.