Skip to content

Commit 0c4b591

Browse files
authored
chore: update Prettier to v3.0.0, apply formatting changes (#185)
1 parent 9576fee commit 0c4b591

File tree

5 files changed

+293
-133
lines changed

5 files changed

+293
-133
lines changed

fixtures/lit/src/expansion-panel.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,10 @@ export class ExpansionPanel extends OpenedMixin(LitElement) {
5757
display: block;
5858
outline: none;
5959
color: rgba(0, 0, 0, 0.87);
60-
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14),
61-
0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2);
60+
box-shadow:
61+
0 2px 2px 0 rgba(0, 0, 0, 0.14),
62+
0 1px 5px 0 rgba(0, 0, 0, 0.12),
63+
0 3px 1px -2px rgba(0, 0, 0, 0.2);
6264
6365
--panel-header-background: #fff;
6466
--panel-header-min-height: 48px;
@@ -149,7 +151,9 @@ export class ExpansionPanel extends OpenedMixin(LitElement) {
149151
background: var(--panel-ripple-background);
150152
transform: scale(0);
151153
opacity: 0;
152-
transition: transform 0s 0.8s, opacity 0.8s;
154+
transition:
155+
transform 0s 0.8s,
156+
opacity 0.8s;
153157
will-change: transform, opacity;
154158
}
155159

package.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,20 +44,19 @@
4444
"@web/dev-server": "^0.1.35",
4545
"concurrently": "^7.6.0",
4646
"deepmerge": "^4.2.2",
47-
"eslint": "^8.29.0",
47+
"eslint": "^8.45.0",
4848
"eslint-config-airbnb-base": "^15.0.0",
4949
"eslint-config-prettier": "^8.5.0",
5050
"eslint-plugin-import": "^2.26.0",
5151
"eslint-plugin-lit": "^1.7.0",
52-
"eslint-plugin-prettier": "^4.2.1",
52+
"eslint-plugin-prettier": "^5.0.0",
5353
"eslint-plugin-wc": "^1.4.0",
5454
"lint-staged": "^13.0.3",
5555
"lit-analyzer": "^2.0.0-pre.2",
5656
"picocolors": "^1.0.0",
5757
"postcss": "^8.3.11",
5858
"postcss-lit": "^1.0.1",
59-
"prettier": "^2.8.1",
60-
"prettier-plugin-package": "^1.3.0",
59+
"prettier": "^3.0.0",
6160
"rimraf": "^3.0.2",
6261
"rollup": "^2.66.1",
6362
"simple-git-hooks": "^2.8.1",

packages/api-demo/src/ui/events.ts

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,15 @@ const renderDetail = (detail: { value: KnobValue }): string => {
1010
return ` detail: ${JSON.stringify(detail).replace(`"${undef}"`, undef)}`;
1111
};
1212

13-
export const renderEvents = (log: CustomEvent[]): TemplateResult =>
14-
html`
15-
${log.map(
16-
(event) => html`
17-
<p part="event-record">
18-
event:
19-
${event.type}.${event.detail == null
20-
? nothing
21-
: renderDetail(event.detail)}
22-
</p>
23-
`
24-
)}
25-
`;
13+
export const renderEvents = (log: CustomEvent[]): TemplateResult => html`
14+
${log.map(
15+
(event) => html`
16+
<p part="event-record">
17+
event:
18+
${event.type}.${event.detail == null
19+
? nothing
20+
: renderDetail(event.detail)}
21+
</p>
22+
`
23+
)}
24+
`;

packages/api-docs/src/utils/markdown.ts

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,13 @@ import DOMPurify from 'dompurify';
55

66
marked.setOptions({ headerIds: false });
77

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

0 commit comments

Comments
 (0)