Skip to content

Commit 7685f2f

Browse files
committed
Revert "npm run prettier:fix"
This reverts commit 108af67.
1 parent 108af67 commit 7685f2f

File tree

51 files changed

+180
-173
lines changed

Some content is hidden

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

51 files changed

+180
-173
lines changed

examples/react-plain-text/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!doctype html>
1+
<!DOCTYPE html>
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8" />

examples/react-plain-text/src/styles.css

+1-5
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,7 @@
99
body {
1010
margin: 0;
1111
background: #eee;
12-
font-family:
13-
system-ui,
14-
-apple-system,
15-
BlinkMacSystemFont,
16-
'.SFNSText-Regular',
12+
font-family: system-ui, -apple-system, BlinkMacSystemFont, '.SFNSText-Regular',
1713
sans-serif;
1814
font-weight: 500;
1915
-webkit-font-smoothing: antialiased;

examples/react-rich-collab/app.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!doctype html>
1+
<!DOCTYPE html>
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8" />

examples/react-rich-collab/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!doctype html>
1+
<!DOCTYPE html>
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8" />

examples/react-rich-collab/src/styles.css

+1-5
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,7 @@ body {
1010
margin: 0;
1111
font-size: 14px;
1212
background: #eee;
13-
font-family:
14-
system-ui,
15-
-apple-system,
16-
BlinkMacSystemFont,
17-
'.SFNSText-Regular',
13+
font-family: system-ui, -apple-system, BlinkMacSystemFont, '.SFNSText-Regular',
1814
sans-serif;
1915
font-weight: 500;
2016
-webkit-font-smoothing: antialiased;

examples/react-rich/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!doctype html>
1+
<!DOCTYPE html>
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8" />

examples/react-rich/src/styles.css

+1-5
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,7 @@
99
body {
1010
margin: 0;
1111
background: #eee;
12-
font-family:
13-
system-ui,
14-
-apple-system,
15-
BlinkMacSystemFont,
16-
'.SFNSText-Regular',
12+
font-family: system-ui, -apple-system, BlinkMacSystemFont, '.SFNSText-Regular',
1713
sans-serif;
1814
font-weight: 500;
1915
-webkit-font-smoothing: antialiased;

examples/react-table/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!doctype html>
1+
<!DOCTYPE html>
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8" />

examples/react-table/src/styles.css

+1-5
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,7 @@
99
body {
1010
margin: 0;
1111
background: #eee;
12-
font-family:
13-
system-ui,
14-
-apple-system,
15-
BlinkMacSystemFont,
16-
'.SFNSText-Regular',
12+
font-family: system-ui, -apple-system, BlinkMacSystemFont, '.SFNSText-Regular',
1713
sans-serif;
1814
font-weight: 500;
1915
-webkit-font-smoothing: antialiased;

examples/vanilla-js-iframe/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!doctype html>
1+
<!DOCTYPE html>
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8" />

examples/vanilla-js-plugin/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!doctype html>
1+
<!DOCTYPE html>
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8" />

examples/vanilla-js/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!doctype html>
1+
<!DOCTYPE html>
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8" />

packages/lexical-devtools-core/src/generateContent.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,10 @@ export function generateContent(
145145
return selection === null
146146
? ': null'
147147
: $isRangeSelection(selection)
148-
? printRangeSelection(selection)
149-
: $isTableSelection(selection)
150-
? printTableSelection(selection)
151-
: printNodeSelection(selection);
148+
? printRangeSelection(selection)
149+
: $isTableSelection(selection)
150+
? printTableSelection(selection)
151+
: printNodeSelection(selection);
152152
});
153153

154154
res += '\n selection' + selectionString;

packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Base.lproj/Main.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!doctype html>
1+
<!DOCTYPE html>
22
<html>
33
<head>
44
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />

packages/lexical-devtools/src/entrypoints/devtools-panel/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!doctype html>
1+
<!DOCTYPE html>
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8" />

packages/lexical-devtools/src/entrypoints/devtools/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!doctype html>
1+
<!DOCTYPE html>
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8" />

packages/lexical-devtools/src/entrypoints/popup/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!doctype html>
1+
<!DOCTYPE html>
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8" />

packages/lexical-headless/src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export function createHeadlessEditor(
3333
'blur',
3434
] as const;
3535

36-
unsupportedMethods.forEach((method: (typeof unsupportedMethods)[number]) => {
36+
unsupportedMethods.forEach((method: typeof unsupportedMethods[number]) => {
3737
editor[method] = () => {
3838
throw new Error(`${method} is not supported in headless mode`);
3939
};

packages/lexical-list/src/LexicalListItemNode.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -563,8 +563,8 @@ function $convertListItemElement(domNode: HTMLElement): DOMConversionOutput {
563563
ariaCheckedAttr === 'true'
564564
? true
565565
: ariaCheckedAttr === 'false'
566-
? false
567-
: undefined;
566+
? false
567+
: undefined;
568568
return {node: $createListItemNode(checked)};
569569
}
570570

packages/lexical-markdown/src/MarkdownTransformers.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -299,8 +299,8 @@ const listExport = (
299299
listType === 'number'
300300
? `${listNode.getStart() + index}. `
301301
: listType === 'check'
302-
? `- [${listItemNode.getChecked() ? 'x' : ' '}] `
303-
: '- ';
302+
? `- [${listItemNode.getChecked() ? 'x' : ' '}] `
303+
: '- ';
304304
output.push(indent + prefix + exportChildren(listItemNode));
305305
index++;
306306
}

packages/lexical-playground/__tests__/e2e/CopyAndPaste/html/ListsHTMLCopyAndPaste.spec.mjs

+3-2
Original file line numberDiff line numberDiff line change
@@ -322,8 +322,9 @@ test.describe('HTML Lists CopyAndPaste', () => {
322322
await focusEditor(page);
323323

324324
// Ensure we preserve checked status.
325-
clipboard['text/html'] =
326-
`<meta charset='utf-8'><ul __lexicallisttype="check"><li role="checkbox" tabindex="-1" aria-checked="true" value="1" class="PlaygroundEditorTheme__listItem PlaygroundEditorTheme__listItemChecked"><span>Hello</span></li><li role="checkbox" tabindex="-1" aria-checked="false" value="2" class="PlaygroundEditorTheme__listItem PlaygroundEditorTheme__listItemUnchecked"><span>world</span></li></ul>`;
325+
clipboard[
326+
'text/html'
327+
] = `<meta charset='utf-8'><ul __lexicallisttype="check"><li role="checkbox" tabindex="-1" aria-checked="true" value="1" class="PlaygroundEditorTheme__listItem PlaygroundEditorTheme__listItemChecked"><span>Hello</span></li><li role="checkbox" tabindex="-1" aria-checked="false" value="2" class="PlaygroundEditorTheme__listItem PlaygroundEditorTheme__listItemUnchecked"><span>world</span></li></ul>`;
327328

328329
await pasteFromClipboard(page, clipboard);
329330

packages/lexical-playground/__tests__/e2e/Extensions.spec.mjs

+66-46
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,13 @@ test.describe('Extensions', () => {
2525
test(`document.execCommand("insertText")`, async ({page}) => {
2626
await focusEditor(page);
2727

28-
await evaluate(page, () => {
29-
document.execCommand('insertText', false, 'foo');
30-
}, []);
28+
await evaluate(
29+
page,
30+
() => {
31+
document.execCommand('insertText', false, 'foo');
32+
},
33+
[],
34+
);
3135
await assertHTML(
3236
page,
3337
html`
@@ -54,27 +58,31 @@ test.describe('Extensions', () => {
5458
}
5559
await focusEditor(page);
5660

57-
await evaluate(page, () => {
58-
function paste() {
59-
const dataTransfer = new DataTransfer();
60-
function dispatchPaste(target, text) {
61-
dataTransfer.setData('text/plain', text);
62-
target.dispatchEvent(
63-
new ClipboardEvent('paste', {
64-
bubbles: true,
65-
cancelable: true,
66-
clipboardData: dataTransfer,
67-
}),
68-
);
69-
dataTransfer.clearData();
61+
await evaluate(
62+
page,
63+
() => {
64+
function paste() {
65+
const dataTransfer = new DataTransfer();
66+
function dispatchPaste(target, text) {
67+
dataTransfer.setData('text/plain', text);
68+
target.dispatchEvent(
69+
new ClipboardEvent('paste', {
70+
bubbles: true,
71+
cancelable: true,
72+
clipboardData: dataTransfer,
73+
}),
74+
);
75+
dataTransfer.clearData();
76+
}
77+
return dispatchPaste;
7078
}
71-
return dispatchPaste;
72-
}
7379

74-
const editor = document.querySelector('div[contenteditable="true"]');
75-
const dispatchPaste = paste();
76-
dispatchPaste(editor, 'foo');
77-
}, []);
80+
const editor = document.querySelector('div[contenteditable="true"]');
81+
const dispatchPaste = paste();
82+
dispatchPaste(editor, 'foo');
83+
},
84+
[],
85+
);
7886
await assertHTML(
7987
page,
8088
html`
@@ -206,25 +214,29 @@ test.describe('Extensions', () => {
206214
await page.keyboard.press('ArrowUp');
207215

208216
// Selection is on the last paragraph
209-
await evaluate(page, async () => {
210-
const editor = document.querySelector('div[contenteditable="true"]');
211-
const selection = window.getSelection();
212-
const secondParagraphTextNode =
213-
editor.firstChild.nextSibling.firstChild.firstChild;
214-
selection.setBaseAndExtent(
215-
secondParagraphTextNode,
216-
0,
217-
secondParagraphTextNode,
218-
3,
219-
);
217+
await evaluate(
218+
page,
219+
async () => {
220+
const editor = document.querySelector('div[contenteditable="true"]');
221+
const selection = window.getSelection();
222+
const secondParagraphTextNode =
223+
editor.firstChild.nextSibling.firstChild.firstChild;
224+
selection.setBaseAndExtent(
225+
secondParagraphTextNode,
226+
0,
227+
secondParagraphTextNode,
228+
3,
229+
);
220230

221-
await new Promise((resolve) => {
222-
setTimeout(() => {
223-
document.execCommand('insertText', false, 'and');
224-
resolve();
225-
}, 50);
226-
});
227-
}, []);
231+
await new Promise((resolve) => {
232+
setTimeout(() => {
233+
document.execCommand('insertText', false, 'and');
234+
resolve();
235+
}, 50);
236+
});
237+
},
238+
[],
239+
);
228240
await assertHTML(
229241
page,
230242
html`
@@ -266,9 +278,13 @@ test.describe('Extensions', () => {
266278
focusPath: [0, 0, 0],
267279
});
268280

269-
await evaluate(page, () => {
270-
document.execCommand('insertText', false, 'New text');
271-
}, []);
281+
await evaluate(
282+
page,
283+
() => {
284+
document.execCommand('insertText', false, 'New text');
285+
},
286+
[],
287+
);
272288
await assertHTML(
273289
page,
274290
html`
@@ -305,9 +321,13 @@ test.describe('Extensions', () => {
305321
focusPath: [0, 0, 0],
306322
});
307323

308-
await evaluate(page, () => {
309-
document.execCommand('insertText', false, 'New text');
310-
}, []);
324+
await evaluate(
325+
page,
326+
() => {
327+
document.execCommand('insertText', false, 'New text');
328+
},
329+
[],
330+
);
311331
await assertHTML(
312332
page,
313333
html`

packages/lexical-playground/__tests__/e2e/Links.spec.mjs

+12-12
Original file line numberDiff line numberDiff line change
@@ -741,8 +741,8 @@ test.describe.parallel('Links', () => {
741741
insertMethod === 'paste:plain'
742742
? clipboardData.plain
743743
: insertMethod === 'paste:html'
744-
? clipboardData.html
745-
: clipboardData.lexical;
744+
? clipboardData.html
745+
: clipboardData.lexical;
746746
await pasteFromClipboard(page, data);
747747
}
748748

@@ -818,8 +818,8 @@ test.describe.parallel('Links', () => {
818818
insertMethod === 'paste:plain'
819819
? clipboardData.plain
820820
: insertMethod === 'paste:html'
821-
? clipboardData.html
822-
: clipboardData.lexical;
821+
? clipboardData.html
822+
: clipboardData.lexical;
823823
await pasteFromClipboard(page, data);
824824
}
825825

@@ -892,8 +892,8 @@ test.describe.parallel('Links', () => {
892892
insertMethod === 'paste:plain'
893893
? clipboardData.plain
894894
: insertMethod === 'paste:html'
895-
? clipboardData.html
896-
: clipboardData.lexical;
895+
? clipboardData.html
896+
: clipboardData.lexical;
897897
await pasteFromClipboard(page, data);
898898
}
899899

@@ -970,8 +970,8 @@ test.describe.parallel('Links', () => {
970970
insertMethod === 'paste:plain'
971971
? clipboardData.plain
972972
: insertMethod === 'paste:html'
973-
? clipboardData.html
974-
: clipboardData.lexical;
973+
? clipboardData.html
974+
: clipboardData.lexical;
975975
await pasteFromClipboard(page, data);
976976
}
977977

@@ -1046,8 +1046,8 @@ test.describe.parallel('Links', () => {
10461046
insertMethod === 'paste:plain'
10471047
? clipboardData.plain
10481048
: insertMethod === 'paste:html'
1049-
? clipboardData.html
1050-
: clipboardData.lexical;
1049+
? clipboardData.html
1050+
: clipboardData.lexical;
10511051
await pasteFromClipboard(page, data);
10521052
}
10531053

@@ -1122,8 +1122,8 @@ test.describe.parallel('Links', () => {
11221122
insertMethod === 'paste:plain'
11231123
? clipboardData.plain
11241124
: insertMethod === 'paste:html'
1125-
? clipboardData.html
1126-
: clipboardData.lexical;
1125+
? clipboardData.html
1126+
: clipboardData.lexical;
11271127
await pasteFromClipboard(page, data);
11281128
}
11291129

0 commit comments

Comments
 (0)