File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -149,7 +149,7 @@ describe('replace option', () => {
149149 replace ( domNode ) {
150150 // `html-dom-parser` bundles its own copy of `domhandler`, so the
151151 // node types use a different `ElementType` enum than `Element`.
152- // eslint-disable-next-line @typescript-eslint/no-unsafe-enum-assignment
152+ // eslint-disable-next-line @typescript-eslint/no-unsafe-enum-assignment, @typescript-eslint/no-unsafe-class-instance-assignment
153153 const element = domNode as Element ;
154154
155155 if ( element . name === 'p' ) {
@@ -178,7 +178,7 @@ describe('replace option', () => {
178178 const options : HTMLReactParserOptions = {
179179 replace ( domNode ) {
180180 if ( domNode instanceof Element ) {
181- // eslint-disable-next-line @typescript-eslint/no-unsafe-enum-assignment
181+ // eslint-disable-next-line @typescript-eslint/no-unsafe-enum-assignment, @typescript-eslint/no-unsafe-class-instance-assignment
182182 return domToReact ( domNode . children as DOMNode [ ] , options ) ;
183183 }
184184 } ,
Original file line number Diff line number Diff line change @@ -90,15 +90,15 @@ describe('canTextBeChildOfNode', () => {
9090 ( nodeName ) => {
9191 const node = {
9292 name : nodeName ,
93- } as Element ;
93+ } as unknown as Element ;
9494 expect ( canTextBeChildOfNode ( node ) ) . toBe ( false ) ;
9595 } ,
9696 ) ;
9797
9898 it ( 'returns true if text can be child of <td/>' , ( ) => {
9999 const node = {
100100 name : 'td' ,
101- } as Element ;
101+ } as unknown as Element ;
102102 expect ( canTextBeChildOfNode ( node ) ) . toBe ( true ) ;
103103 } ) ;
104104} ) ;
You can’t perform that action at this time.
0 commit comments