Skip to content

Commit dcc6121

Browse files
committed
style(ui): reformat index exports and generator line wrapping
1 parent 1b7c0dd commit dcc6121

3 files changed

Lines changed: 6 additions & 11 deletions

File tree

‎ui/composite/cookie/consent/index.ts‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
export { acceptAllConsent } from "./acceptAllConsent.js"
22
export { type ConsentConfig, defaultConsentConfig, resolveConsentConfig } from "./consentConfig.js"
3-
export type {
4-
ConsentCategory,
5-
ConsentChoices,
6-
ConsentPreferences,
7-
GoogleTrackingConfig,
8-
} from "./consentTypes.js"
3+
export type { ConsentCategory, ConsentChoices, ConsentPreferences, GoogleTrackingConfig } from "./consentTypes.js"
94
export { enableGoogleTracking } from "./enableGoogleTracking.js"
105
export { ensureGtag } from "./ensureGtag.js"
116
export { getStoredConsent } from "./getStoredConsent.js"

‎ui/generate_ui_index/generateIndexAgents.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ export async function generateIndexAgents(uiDirRelative: string, outputFileRelat
1717

1818
const relFromUi = relative(uiDirAbsolute, file)
1919
const category = relFromUi.split(sep)[0] ?? relFromUi
20-
const importPath = `#ui/${relFromUi.split(sep).join("/").replace(/\.tsx$/, ".jsx")}`
20+
const importPath = `#ui/${relFromUi
21+
.split(sep)
22+
.join("/")
23+
.replace(/\.tsx$/, ".jsx")}`
2124
for (const e of exports) {
2225
;(byCategory[category] ??= []).push({ ...e, importPath })
2326
}

‎ui/generate_ui_index/parts/renderUiIndexMarkdown.ts‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,7 @@ export function renderUiIndexMarkdown(byCategory: Record<string, ComponentIndexE
2121
const categories = Object.keys(byCategory).sort()
2222
const entriesOf = (c: string): ComponentIndexEntry[] => byCategory[c] ?? []
2323
const total = categories.reduce((sum, c) => sum + entriesOf(c).length, 0)
24-
const documented = categories.reduce(
25-
(sum, c) => sum + entriesOf(c).filter((e) => e.description).length,
26-
0,
27-
)
24+
const documented = categories.reduce((sum, c) => sum + entriesOf(c).filter((e) => e.description).length, 0)
2825

2926
const sections = categories.map((category) => {
3027
const entries = [...entriesOf(category)].sort((a, b) => a.name.localeCompare(b.name))

0 commit comments

Comments
 (0)