Skip to content

Commit

Permalink
chore: run lint
Browse files Browse the repository at this point in the history
  • Loading branch information
metonym committed Nov 30, 2024
1 parent 1f7ec1b commit 6c1dae6
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 20 deletions.
7 changes: 2 additions & 5 deletions docs/src/COMPONENT_API.json
Original file line number Diff line number Diff line change
Expand Up @@ -3235,10 +3235,7 @@
"ts": "interface DataTableCell<\n Row = DataTableRow,\n> {\n key:\n | DataTableKey<Row>\n | (string & {});\n value: DataTableValue;\n display?: (\n item: DataTableValue,\n row: DataTableRow,\n ) => DataTableValue;\n}\n"
}
],
"generics": [
"Row",
"Row extends DataTableRow = DataTableRow"
],
"generics": ["Row", "Row extends DataTableRow = DataTableRow"],
"rest_props": {
"type": "Element",
"name": "div"
Expand Down Expand Up @@ -18066,4 +18063,4 @@
}
}
]
}
}
30 changes: 18 additions & 12 deletions docs/src/components/ComponentApi.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@
$: source = `https://github.com/carbon-design-system/carbon-components-svelte/tree/master/${component.filePath}`;
$: forwarded_events = component.events.filter(
(event) => event.type === "forwarded"
(event) => event.type === "forwarded",
);
$: dispatched_events = component.events.filter(
(event) => event.type === "dispatched"
(event) => event.type === "dispatched",
);
</script>

Expand Down Expand Up @@ -116,20 +116,20 @@
>
<svelte:component
this={AsyncPreviewTypeScript}
type="inline"
code={typeMap[type]}
/>
</div>
type="inline"
code={typeMap[type]}
/>
</div>
{:else}
<div
style="display: inline-flex; max-width: 220px; word-break: break-word;"
>
<svelte:component
this={AsyncPreviewTypeScript}
type="inline"
code={type}
/>
</div>
type="inline"
code={type}
/>
</div>
{/if}
</div>
{/each}
Expand All @@ -145,10 +145,16 @@
</div>
{/each}
{/if}
<div style:margin-top="var(--cds-layout-02)" style:margin-bottom="var(--cds-spacing-03)">
<div
style:margin-top="var(--cds-layout-02)"
style:margin-bottom="var(--cds-spacing-03)"
>
<strong>Default value</strong>
</div>
<div style:margin-bottom="var(--cds-layout-01)" style:max-width="85%">
<div
style:margin-bottom="var(--cds-layout-01)"
style:max-width="85%"
>
{#if prop.value === undefined}
<em>undefined</em>
{:else}
Expand Down
6 changes: 3 additions & 3 deletions scripts/format-component-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import { format } from "prettier";
import plugin from "prettier/plugins/typescript";

const formatTypeScript = async (value) => {
return await format(value, {
parser: "typescript",
return await format(value, {
parser: "typescript",
plugins: [plugin],
printWidth: 40, // Force breaking onto new lines
bracketSameLine: false
bracketSameLine: false,
});
};

Expand Down

0 comments on commit 6c1dae6

Please sign in to comment.