Skip to content

Commit 0fec8f6

Browse files
committed
tsc
1 parent e8ce3a9 commit 0fec8f6

File tree

12 files changed

+101
-11
lines changed

12 files changed

+101
-11
lines changed

eslint.config.mjs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,17 @@ export default [
414414
},
415415
},
416416

417+
// Override: Tests - disable react-hooks rules that flag patterns we
418+
// intentionally use in tests (reassigning module-scoped variables and
419+
// mutating captured objects from inside test components/hooks).
420+
{
421+
files: ['packages/**/__tests__/**', 'scripts/__tests__/**'],
422+
rules: {
423+
'react-hooks/globals': OFF,
424+
'react-hooks/immutability': OFF,
425+
},
426+
},
427+
417428
// Override: Index exports - restrict default exports
418429
{
419430
files: [

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,6 @@
133133
"@types/proper-lockfile": "^4.1.4",
134134
"@types/react": "^19.2.14",
135135
"@types/react-dom": "^19.2.3",
136-
"@types/trusted-types": "^2.0.7",
137136
"@eslint/compat": "^2.0.5",
138137
"@eslint/js": "^10.0.0",
139138
"@vitejs/plugin-react": "^6.0.1",

packages/lexical-clipboard/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"@lexical/list": "workspace:*",
1818
"@lexical/selection": "workspace:*",
1919
"@lexical/utils": "workspace:*",
20+
"@types/trusted-types": "^2.0.7",
2021
"lexical": "workspace:*"
2122
},
2223
"repository": {

packages/lexical-clipboard/src/clipboard.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
*
77
*/
88

9+
/// <reference types="trusted-types" />
10+
911
import {$generateHtmlFromNodes, $generateNodesFromDOM} from '@lexical/html';
1012
import {$addNodeStyle, $sliceSelectedTextNodeContent} from '@lexical/selection';
1113
import {objectKlassEquals} from '@lexical/utils';

packages/lexical-list/src/__tests__/unit/LexicalListNode.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ import {
1414
ListItemNode,
1515
ListNode,
1616
} from '@lexical/list';
17+
import {waitForReact} from '@lexical/react/src/__tests__/utils';
1718
import {$createTextNode, $getRoot, ParagraphNode, TextNode} from 'lexical';
1819
import {
1920
expectHtmlToBeEqual,
2021
html,
2122
initializeUnitTest,
2223
} from 'lexical/src/__tests__/utils';
23-
import {waitForReact} from 'packages/lexical-react/src/__tests__/unit/utils';
2424
import {assert, describe, expect, test} from 'vitest';
2525

2626
const editorConfig = Object.freeze({

packages/lexical-playground/src/plugins/CollapsiblePlugin/CollapsibleUtils.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
*/
88

99
export function setDomHiddenUntilFound(dom: HTMLElement): void {
10-
// @ts-expect-error
1110
dom.hidden = 'until-found';
1211
}
1312

packages/lexical-react/src/__tests__/unit/Collaboration.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import {
2525
createTestConnection,
2626
TestConnection,
2727
waitForReact,
28-
} from './utils';
28+
} from '../utils';
2929

3030
describe('Collaboration', () => {
3131
let container: null | HTMLDivElement = null;

packages/lexical-react/src/__tests__/unit/CollaborationSnapshot.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import {expectHtmlToBeEqual, html} from 'lexical/src/__tests__/utils';
2525
import {afterEach, beforeEach, describe, it} from 'vitest';
2626
import * as Y from 'yjs';
2727

28-
import {Client, createTestConnection, waitForReact} from './utils';
28+
import {Client, createTestConnection, waitForReact} from '../utils';
2929

3030
describe('CollaborationSnapshot', () => {
3131
let container: null | HTMLDivElement = null;

packages/lexical-react/src/__tests__/unit/CollaborationWithCollisions.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import {
2626
stopClients,
2727
testClientsForEquality,
2828
waitForReact,
29-
} from './utils';
29+
} from '../utils';
3030

3131
const $insertParagraph = (...children: Array<string | LexicalNode>) => {
3232
const root = $getRoot();
File renamed without changes.

0 commit comments

Comments
 (0)