Skip to content

Commit

Permalink
chore: update Prettier to v3.0.0, apply formatting changes (#185)
Browse files Browse the repository at this point in the history
  • Loading branch information
web-padawan authored Jul 21, 2023
1 parent 9576fee commit 0c4b591
Show file tree
Hide file tree
Showing 5 changed files with 293 additions and 133 deletions.
10 changes: 7 additions & 3 deletions fixtures/lit/src/expansion-panel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,10 @@ export class ExpansionPanel extends OpenedMixin(LitElement) {
display: block;
outline: none;
color: rgba(0, 0, 0, 0.87);
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14),
0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2);
box-shadow:
0 2px 2px 0 rgba(0, 0, 0, 0.14),
0 1px 5px 0 rgba(0, 0, 0, 0.12),
0 3px 1px -2px rgba(0, 0, 0, 0.2);
--panel-header-background: #fff;
--panel-header-min-height: 48px;
Expand Down Expand Up @@ -149,7 +151,9 @@ export class ExpansionPanel extends OpenedMixin(LitElement) {
background: var(--panel-ripple-background);
transform: scale(0);
opacity: 0;
transition: transform 0s 0.8s, opacity 0.8s;
transition:
transform 0s 0.8s,
opacity 0.8s;
will-change: transform, opacity;
}
Expand Down
7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,20 +44,19 @@
"@web/dev-server": "^0.1.35",
"concurrently": "^7.6.0",
"deepmerge": "^4.2.2",
"eslint": "^8.29.0",
"eslint": "^8.45.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-lit": "^1.7.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-prettier": "^5.0.0",
"eslint-plugin-wc": "^1.4.0",
"lint-staged": "^13.0.3",
"lit-analyzer": "^2.0.0-pre.2",
"picocolors": "^1.0.0",
"postcss": "^8.3.11",
"postcss-lit": "^1.0.1",
"prettier": "^2.8.1",
"prettier-plugin-package": "^1.3.0",
"prettier": "^3.0.0",
"rimraf": "^3.0.2",
"rollup": "^2.66.1",
"simple-git-hooks": "^2.8.1",
Expand Down
25 changes: 12 additions & 13 deletions packages/api-demo/src/ui/events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,15 @@ const renderDetail = (detail: { value: KnobValue }): string => {
return ` detail: ${JSON.stringify(detail).replace(`"${undef}"`, undef)}`;
};

export const renderEvents = (log: CustomEvent[]): TemplateResult =>
html`
${log.map(
(event) => html`
<p part="event-record">
event:
${event.type}.${event.detail == null
? nothing
: renderDetail(event.detail)}
</p>
`
)}
`;
export const renderEvents = (log: CustomEvent[]): TemplateResult => html`
${log.map(
(event) => html`
<p part="event-record">
event:
${event.type}.${event.detail == null
? nothing
: renderDetail(event.detail)}
</p>
`
)}
`;
21 changes: 10 additions & 11 deletions packages/api-docs/src/utils/markdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@ import DOMPurify from 'dompurify';

marked.setOptions({ headerIds: false });

export const parse = (markdown?: string): TemplateResult =>
html`
${!markdown
? nothing
: unsafeHTML(
DOMPurify.sanitize(marked(markdown)).replace(
/<(h[1-6]|a|p|ul|ol|li|pre|code|strong|em|blockquote|del)(\s+href="[^"]+")*>/g,
'<$1 part="md-$1"$2>'
)
)}
`;
export const parse = (markdown?: string): TemplateResult => html`
${!markdown
? nothing
: unsafeHTML(
DOMPurify.sanitize(marked(markdown)).replace(
/<(h[1-6]|a|p|ul|ol|li|pre|code|strong|em|blockquote|del)(\s+href="[^"]+")*>/g,
'<$1 part="md-$1"$2>'
)
)}
`;
Loading

0 comments on commit 0c4b591

Please sign in to comment.