Skip to content

Commit cbc40ac

Browse files
committed
chore: prettier
1 parent cc5f395 commit cbc40ac

File tree

9 files changed

+36
-43
lines changed

9 files changed

+36
-43
lines changed

docs/_data/site.cjs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ module.exports = async function () {
1111
},
1212
{
1313
name: 'Slack',
14-
url:
15-
'https://join.slack.com/t/lit-and-friends/shared_invite/zt-llwznvsy-LZwT13R66gOgnrg12PUGqw',
14+
url: 'https://join.slack.com/t/lit-and-friends/shared_invite/zt-llwznvsy-LZwT13R66gOgnrg12PUGqw',
1615
},
1716
],
1817
gitSiteUrl: 'https://github.com/modernweb-dev/rocket',

packages/eleventy-plugin-mdjs-unified/test-node/eleventy-plugin-mdjs-unified.test.js

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,7 @@ describe('eleventy-plugin-mdjs-unified', () => {
4444
const files = await renderEleventy('./test-node/fixtures/md');
4545
expect(files).to.deep.equal([
4646
{
47-
html:
48-
'<h1 id="first"><a aria-hidden="true" tabindex="-1" href="#first"><span class="icon icon-link"></span></a>First</h1>',
47+
html: '<h1 id="first"><a aria-hidden="true" tabindex="-1" href="#first"><span class="icon icon-link"></span></a>First</h1>',
4948
name: 'first/index.html',
5049
},
5150
]);
@@ -65,8 +64,7 @@ describe('eleventy-plugin-mdjs-unified', () => {
6564
const files = await renderEleventy('./test-node/fixtures/mdjs-import');
6665
expect(files).to.deep.equal([
6766
{
68-
html:
69-
'<p>first</p>\n <script type="module" src="/first/__mdjs-stories.js" mdjs-setup></script>\n ',
67+
html: '<p>first</p>\n <script type="module" src="/first/__mdjs-stories.js" mdjs-setup></script>\n ',
7068
name: 'first/index.html',
7169
},
7270
]);
@@ -76,8 +74,7 @@ describe('eleventy-plugin-mdjs-unified', () => {
7674
const files = await renderEleventy('./test-node/fixtures/mdjs-import-in-subpage');
7775
expect(files).to.deep.equal([
7876
{
79-
html:
80-
'<p>first</p>\n <script type="module" src="/subpage/first/__mdjs-stories.js" mdjs-setup></script>\n ',
77+
html: '<p>first</p>\n <script type="module" src="/subpage/first/__mdjs-stories.js" mdjs-setup></script>\n ',
8178
name: 'subpage/first/index.html',
8279
},
8380
]);
@@ -87,8 +84,7 @@ describe('eleventy-plugin-mdjs-unified', () => {
8784
const files = await renderEleventy('./test-node/fixtures/mdjs-import-index');
8885
expect(files).to.deep.equal([
8986
{
90-
html:
91-
'<p>index</p>\n <script type="module" src="/__mdjs-stories.js" mdjs-setup></script>\n ',
87+
html: '<p>index</p>\n <script type="module" src="/__mdjs-stories.js" mdjs-setup></script>\n ',
9288
name: 'index.html',
9389
},
9490
]);
@@ -98,8 +94,7 @@ describe('eleventy-plugin-mdjs-unified', () => {
9894
const files = await renderEleventy('./test-node/fixtures/plugin-configure');
9995
expect(files).to.deep.equal([
10096
{
101-
html:
102-
'<h1 id="first"><a class="anchor" href="#first"><span class="icon icon-link"></span></a>First</h1>',
97+
html: '<h1 id="first"><a class="anchor" href="#first"><span class="icon icon-link"></span></a>First</h1>',
10398
name: 'first/index.html',
10499
},
105100
]);

packages/launch/preset/_data/site.cjs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ module.exports = function () {
1111
},
1212
{
1313
name: 'Slack',
14-
url:
15-
'https://join.slack.com/t/lit-and-friends/shared_invite/zt-llwznvsy-LZwT13R66gOgnrg12PUGqw',
14+
url: 'https://join.slack.com/t/lit-and-friends/shared_invite/zt-llwznvsy-LZwT13R66gOgnrg12PUGqw',
1615
},
1716
],
1817
gitSiteUrl: 'https://github.com/modernweb-dev/rocket',

packages/launch/preset/rocketLaunch.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ function addOcticonToHeadlines(plugins) {
3131
tagName: 'path',
3232
properties: {
3333
fillRule: 'evenodd',
34-
d:
35-
'M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z',
34+
d: 'M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z',
3635
},
3736
},
3837
],

packages/mdjs-preview/src/MdJsPreview.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -255,9 +255,9 @@ export class MdJsPreview extends ScopedElementsMixin(LitElement) {
255255
}
256256

257257
get iframeUrl() {
258-
const mdjsSetupScript = /** @type {HTMLScriptElement} */ (document.querySelector(
259-
'script[type=module][mdjs-setup]',
260-
));
258+
const mdjsSetupScript = /** @type {HTMLScriptElement} */ (
259+
document.querySelector('script[type=module][mdjs-setup]')
260+
);
261261
if (!mdjsSetupScript) {
262262
throw new Error('Could not find a <script type="module" src="..." mdjs-setup></script>');
263263
}

packages/mdjs-preview/src/resizeHandler.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ export function addResizeHandler() {
88
window.addEventListener('message', ev => {
99
const data = JSON.parse(ev.data);
1010
if (data.action === 'mdjs-viewer-resize') {
11-
const viewer = /** @type {import('./MdJsPreview.js').MdJsPreview} */ (document.body.querySelector(
12-
`[mdjs-story-name="${data.storyKey}"]`,
13-
));
11+
const viewer = /** @type {import('./MdJsPreview.js').MdJsPreview} */ (
12+
document.body.querySelector(`[mdjs-story-name="${data.storyKey}"]`)
13+
);
1414
if (viewer) {
1515
viewer.contentHeight = data.height;
1616
}

packages/navigation/src/RocketNavigation.js

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,19 @@
99
function debounce(func, wait, immediate) {
1010
/** @type {number|undefined} */
1111
let timeout;
12-
return /** @type {typeof func}*/ (function () {
13-
let args = /** @type {Parameters<typeof func>} */ (/** @type {unknown}*/ (arguments));
14-
const later = () => {
15-
timeout = undefined;
16-
if (!immediate) func.apply(this, args);
17-
};
18-
const callNow = immediate && !timeout;
19-
clearTimeout(timeout);
20-
timeout = setTimeout(later, wait);
21-
if (callNow) func.apply(this, args);
22-
});
12+
return /** @type {typeof func}*/ (
13+
function () {
14+
let args = /** @type {Parameters<typeof func>} */ (/** @type {unknown}*/ (arguments));
15+
const later = () => {
16+
timeout = undefined;
17+
if (!immediate) func.apply(this, args);
18+
};
19+
const callNow = immediate && !timeout;
20+
clearTimeout(timeout);
21+
timeout = setTimeout(later, wait);
22+
if (callNow) func.apply(this, args);
23+
}
24+
);
2325
}
2426

2527
/**
@@ -51,9 +53,9 @@ export class RocketNavigation extends HTMLElement {
5153

5254
this.addEventListener('click', this.__clickHandler);
5355

54-
const anchors = /** @type {NodeListOf<HTMLAnchorElement>} */ (this.querySelectorAll(
55-
'li.current a.anchor',
56-
));
56+
const anchors = /** @type {NodeListOf<HTMLAnchorElement>} */ (
57+
this.querySelectorAll('li.current a.anchor')
58+
);
5759

5860
for (const anchor of anchors) {
5961
const headline = document.getElementById(anchor.hash.substring(1));

packages/plugins-manager/src/metaConfigToWebDevServerConfig.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,9 @@ export function metaConfigToWebDevServerConfig(
2424
return pluginObj;
2525
});
2626

27-
const rollupPlugins = /** @type {MetaPluginWrapable[]} */ (executeSetupFunctions(
28-
config.setupRollupPlugins,
29-
[...metaPluginsNoWrap],
30-
));
27+
const rollupPlugins = /** @type {MetaPluginWrapable[]} */ (
28+
executeSetupFunctions(config.setupRollupPlugins, [...metaPluginsNoWrap])
29+
);
3130

3231
const wrappedRollupPlugins = rollupPlugins.map(pluginObj => {
3332
if (typeof rollupWrapperFunction === 'function' && pluginObj.__noWrap !== true) {

packages/search/src/RocketSearch.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,9 @@ export class RocketSearch extends ScopedElementsMixin(LitElement) {
9999
/** @param {import('lit-element').PropertyValues } changedProperties */
100100
update(changedProperties) {
101101
if (this.miniSearch && changedProperties.has('search')) {
102-
this.results = /** @type {RocketSearchResult[]} */ (this.miniSearch.search(
103-
this.search,
104-
)).slice(0, this.maxResults);
102+
this.results = /** @type {RocketSearchResult[]} */ (
103+
this.miniSearch.search(this.search)
104+
).slice(0, this.maxResults);
105105
}
106106

107107
super.update(changedProperties);

0 commit comments

Comments
 (0)