Skip to content

Commit 2f48876

Browse files
committed
remove trailingComma
1 parent 0423d99 commit 2f48876

43 files changed

Lines changed: 152 additions & 154 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

site/.prettierrc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"semi": true,
44
"singleQuote": false,
55
"tabWidth": 2,
6-
"trailingComma": "all",
6+
"trailingComma": "none",
77
"useTabs": false,
88
"endOfLine": "lf",
99
"bracketSpacing": true,

site/astro.config.mjs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ export default defineConfig({
1111
trailingSlash: "always",
1212
server: {
1313
host: true,
14-
port: 4323,
14+
port: 4323
1515
},
1616
integrations: [
1717
icon({
18-
iconDir: "src/assets/icons",
18+
iconDir: "src/assets/icons"
1919
}),
20-
preact(),
21-
],
20+
preact()
21+
]
2222
});

site/src/components/BreaksList.tsx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ interface BreaksListProps {
1919

2020
const formSchema = z.object({
2121
query: z.string().default(""),
22-
version: z.enum(["2", "3"]).default("2"),
22+
version: z.enum(["2", "3"]).default("2")
2323
});
2424

2525
/** Reduced object format pertaining to a single SC/requirement */
@@ -39,7 +39,7 @@ interface BreakWcagLabelProps {
3939

4040
const BreakWcagLabel = ({
4141
break: { photosensitivity, wcag2, wcag3 },
42-
version,
42+
version
4343
}: BreakWcagLabelProps) => {
4444
const label =
4545
version === "2" ? `${wcag2}: ${wcag2SuccessCriteria[wcag2!]}` : wcag3!;
@@ -87,7 +87,7 @@ export const BreaksList = ({ breaks, breakProcessesMap }: BreaksListProps) => {
8787
return !!data.wcag2!.find(
8888
(c) =>
8989
c.includes(query) ||
90-
caseInsensitiveIncludes(wcag2SuccessCriteria[c], query),
90+
caseInsensitiveIncludes(wcag2SuccessCriteria[c], query)
9191
);
9292
return !!data.wcag3!.find((r) => caseInsensitiveIncludes(r, query));
9393
});
@@ -99,7 +99,7 @@ export const BreaksList = ({ breaks, breakProcessesMap }: BreaksListProps) => {
9999
breaks.push({
100100
...omit(brk.data, "location", "process", "wcag2", "wcag3"),
101101
id: brk.id,
102-
[wcagProp]: value,
102+
[wcagProp]: value
103103
});
104104
}
105105

@@ -126,8 +126,8 @@ export const BreaksList = ({ breaks, breakProcessesMap }: BreaksListProps) => {
126126
formSchema.parse({
127127
arrangement: formData.get("a"),
128128
query: formData.get("q"),
129-
version: formData.get("v"),
130-
}),
129+
version: formData.get("v")
130+
})
131131
);
132132
const newUrl = new URL(location.href);
133133
for (const name of ["a", "q", "v"]) {
@@ -144,8 +144,8 @@ export const BreaksList = ({ breaks, breakProcessesMap }: BreaksListProps) => {
144144
formSchema.parse({
145145
arrangement: params.get("a") || undefined,
146146
query: params.get("q") || undefined,
147-
version: params.get("v") || undefined,
148-
}),
147+
version: params.get("v") || undefined
148+
})
149149
);
150150
};
151151

@@ -207,7 +207,7 @@ export const BreaksList = ({ breaks, breakProcessesMap }: BreaksListProps) => {
207207
getSortableWcag(brk)) && (
208208
<dt
209209
id={slugger.slug(
210-
`${name}-${brk[wcagProp]?.replace(/\./g, "-")}`,
210+
`${name}-${brk[wcagProp]?.replace(/\./g, "-")}`
211211
)}
212212
>
213213
<BreakWcagLabel
@@ -219,7 +219,7 @@ export const BreaksList = ({ breaks, breakProcessesMap }: BreaksListProps) => {
219219
{brk.description.map((description) => (
220220
<dd
221221
id={slugger.slug(
222-
`${name}-${brk[wcagProp]?.replace(/\./g, "-")}`,
222+
`${name}-${brk[wcagProp]?.replace(/\./g, "-")}`
223223
)}
224224
>
225225
<a href={`${museumBaseUrl.slice(0, -1)}${brk.href}`}>
@@ -235,7 +235,7 @@ export const BreaksList = ({ breaks, breakProcessesMap }: BreaksListProps) => {
235235
</strong>{" "}
236236
<span
237237
dangerouslySetInnerHTML={{
238-
__html: brk.discussionItems[0],
238+
__html: brk.discussionItems[0]
239239
}}
240240
/>
241241
</div>

site/src/components/Carousel.astro

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@ const { entries } = Astro.props;
1818
const collectionMap = {
1919
blog: {
2020
label: "Post",
21-
path: "blog",
21+
path: "blog"
2222
},
2323
exhibits: {
2424
label: "Exhibit",
25-
path: "collections",
25+
path: "collections"
2626
},
2727
products: {
2828
label: "Merch",
29-
path: "gift-shop",
30-
},
29+
path: "gift-shop"
30+
}
3131
};
3232
3333
/** @breaklocation Home & Search */
@@ -125,7 +125,7 @@ const collectionMap = {
125125

126126
<style
127127
define:vars={{
128-
cursorUrl: `url(${import.meta.env.BASE_URL}radial-cursor.png)`,
128+
cursorUrl: `url(${import.meta.env.BASE_URL}radial-cursor.png)`
129129
}}
130130
>
131131
.carousel {

site/src/components/CoverImage.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ const image = await getImage({
2424
...(typeof height === "number" && { height }),
2525
...(typeof height === "string" && { height: parseInt(height) }),
2626
...(typeof width === "number" && { width }),
27-
...(typeof width === "string" && { width: parseInt(width) }),
27+
...(typeof width === "string" && { width: parseInt(width) })
2828
});
2929
3030
const attributes = {
3131
// Only include width/height if they were originally specified
3232
...omit(image.attributes, "height", "width"),
3333
height,
3434
width,
35-
...(objectPosition && { style: { objectPosition } }),
35+
...(objectPosition && { style: { objectPosition } })
3636
};
3737
---
3838

site/src/components/Favorite.astro

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ const { id, size = 48 } = Astro.props;
6666
if (oldFavorites && oldFavorites?.[key] === favorites[key]) continue;
6767

6868
const el = document.getElementById(
69-
`favorite-${key}`,
69+
`favorite-${key}`
7070
) as HTMLElement | null;
7171
if (!el) continue;
7272

@@ -96,27 +96,27 @@ const { id, size = 48 } = Astro.props;
9696
actionCallback() {
9797
persist("favorites", {
9898
...recall("favorites"),
99-
[key]: !value,
99+
[key]: !value
100100
});
101101
},
102102
actionLabel: "Undo",
103-
duration: 3000,
103+
duration: 3000
104104
});
105105
}
106106
}
107107
});
108108

109109
document.body.addEventListener("click", (event) => {
110110
const el = (event.target as HTMLElement).closest(
111-
".favorite[id^='favorite-']",
111+
".favorite[id^='favorite-']"
112112
);
113113
if (!el) return;
114114

115115
const key = el.id.slice(9);
116116
const oldFavorites = recall("favorites");
117117
persist("favorites", {
118118
...oldFavorites,
119-
[key]: !oldFavorites[key],
119+
[key]: !oldFavorites[key]
120120
});
121121
});
122122
</script>

site/src/components/Modal.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ const { closeOnBackdrop, closeOnKeyboard, id, mode = getMode() } = Astro.props;
6868
// Detecting this way allows hiding an open modal via Escape even if
6969
// focus isn't within it, which is what happens on the site we used for reference
7070
const el = document.querySelector(
71-
"[data-modal-close-on-keyboard]:not([hidden])",
71+
"[data-modal-close-on-keyboard]:not([hidden])"
7272
);
7373
if (el) hideModal(el.id);
7474
});

site/src/components/Navigation.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ const actualFailureMode = getMode() === "broken" ? failureMode : undefined;
4747
<li class={rest.headerClass}>
4848
<a href={rest.href}>{name}</a>
4949
</li>
50-
),
50+
)
5151
)
5252
}
5353
</ul>

site/src/components/Search.astro

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ const { mode = getMode() } = Astro.props;
8484
function search(query: string) {
8585
searchInput.value = query;
8686
const filteredResults = allResults.filter(({ title }) =>
87-
title.toLowerCase().includes(query.toLowerCase()),
87+
title.toLowerCase().includes(query.toLowerCase())
8888
);
8989
const resultsHtml = query
9090
? `<ul>${filteredResults
@@ -134,11 +134,11 @@ const { mode = getMode() } = Astro.props;
134134
history.pushState(
135135
{},
136136
"",
137-
`${museumBaseUrl}search/?query=${encodeURIComponent(query)}`,
137+
`${museumBaseUrl}search/?query=${encodeURIComponent(query)}`
138138
);
139139

140140
search(query);
141-
}, 500),
141+
}, 500)
142142
);
143143
}
144144
</script>

site/src/components/Toast.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { Icon } from "astro-icon/components";
1111
1212
const iconMap = {
1313
error: "ri:error-warning-line",
14-
info: "ri:information-2-line",
14+
info: "ri:information-2-line"
1515
} as const;
1616
// Expose ToastType from here for use by API in toast.ts
1717
export type ToastType = keyof typeof iconMap;

0 commit comments

Comments
 (0)