1
+ import HTMLInspector from 'html-inspector' ;
1
2
import last from 'lodash/last' ;
2
3
import isNull from 'lodash/isNull' ;
3
4
import trim from 'lodash/trim' ;
4
5
import { localizedArrayToSentence } from '../../util/arrayToSentence' ;
5
- import retryingFailedImports from '../../util/retryingFailedImports' ;
6
6
import Validator from '../Validator' ;
7
7
8
8
const specialCases = {
@@ -82,6 +82,11 @@ function noListsWithTextChildrenValidator(listener, reporter) {
82
82
} ) ;
83
83
}
84
84
85
+ HTMLInspector . rules . add (
86
+ 'validate-list-children' ,
87
+ noListsWithTextChildrenValidator ,
88
+ ) ;
89
+
85
90
class HtmlInspectorValidator extends Validator {
86
91
constructor ( source ) {
87
92
super ( source , 'html' , errorMap ) ;
@@ -93,16 +98,6 @@ class HtmlInspectorValidator extends Validator {
93
98
return Promise . resolve ( [ ] ) ;
94
99
}
95
100
96
- const HTMLInspector = await retryingFailedImports ( ( ) => import (
97
- /* webpackChunkName: 'mainAsync' */
98
- 'html-inspector' ,
99
- ) ) ;
100
-
101
- HTMLInspector . rules . add (
102
- 'validate-list-children' ,
103
- noListsWithTextChildrenValidator ,
104
- ) ;
105
-
106
101
return new Promise ( ( resolve ) => {
107
102
HTMLInspector . inspect ( {
108
103
domRoot : this . _doc . documentElement ,
0 commit comments