Skip to content

Commit 7f50c46

Browse files
committed
ci: Lint love
1 parent fc9a0aa commit 7f50c46

4 files changed

Lines changed: 24 additions & 9 deletions

File tree

lib/classes/eik-config.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,11 @@ export default class EikConfig {
153153
? destination
154154
: ensurePosix(join(destination, localFile.relative));
155155
const packagePathname = ensurePosix(
156-
join(typeSlug(/** @type {string} */ (this.type)), /** @type {string} */ (this.name), /** @type {string} */ (this.version)),
156+
join(
157+
typeSlug(/** @type {string} */ (this.type)),
158+
/** @type {string} */ (this.name),
159+
/** @type {string} */ (this.version),
160+
),
157161
);
158162

159163
const remoteDestination = new RemoteFileLocation(

lib/helpers/fetch-import-maps.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,8 @@ export async function fetchImportMaps(urls = []) {
3939
return await Promise.all(maps);
4040
} catch (err) {
4141
const message = err instanceof Error ? err.message : String(err);
42-
throw new Error(
43-
`Unable to load import map file from server: ${message}`,
44-
{ cause: err },
45-
);
42+
throw new Error(`Unable to load import map file from server: ${message}`, {
43+
cause: err,
44+
});
4645
}
4746
}

test/helpers/fetch-import-maps.test.js

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,10 @@ tap.test("returns an error if server says no", async (t) => {
9494
await fetchImportMaps([`${address}/map/rejected-response/v1`]);
9595
t.fail("Expected to throw");
9696
} catch (e) {
97-
t.match(e instanceof Error ? e.message : String(e), "rejected client request");
97+
t.match(
98+
e instanceof Error ? e.message : String(e),
99+
"rejected client request",
100+
);
98101
t.pass();
99102
}
100103
});
@@ -116,7 +119,10 @@ tap.test(
116119
await fetchImportMaps([`${address}/map/empty-response/v1`]);
117120
t.fail("Expected to throw");
118121
} catch (e) {
119-
t.match(e instanceof Error ? e.message : String(e), "got an empty response");
122+
t.match(
123+
e instanceof Error ? e.message : String(e),
124+
"got an empty response",
125+
);
120126
t.pass();
121127
}
122128
},
@@ -129,7 +135,10 @@ tap.test(
129135
await fetchImportMaps([`${address}/map/text-response/v1`]);
130136
t.fail("Expected to throw");
131137
} catch (e) {
132-
t.match(e instanceof Error ? e.message : String(e), "did not return JSON, got");
138+
t.match(
139+
e instanceof Error ? e.message : String(e),
140+
"did not return JSON, got",
141+
);
133142
t.pass();
134143
}
135144
},

test/schemas/index.test.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@ test("validate asset manifest - all props invalid", (t) => {
2525
});
2626

2727
t.same(result.value, { name: "", type: "package" });
28-
t.equal(Array.isArray(result.error) ? result.error[0].message : undefined, `must have required property 'server'`);
28+
t.equal(
29+
Array.isArray(result.error) ? result.error[0].message : undefined,
30+
`must have required property 'server'`,
31+
);
2932
t.end();
3033
});
3134

0 commit comments

Comments
 (0)