Try linting a file that has just a script tag, this is quite common when building webcomponents or polymer elements. Added an empty comment tag at the start of the file works around but this is ugly.
/usr/lib/node_modules/my-web-component/node_modules/eslint-plugin-html/src/extract.js:42
criptCode[scriptCode.length - 1] = scriptCode[scriptCode.length - 1].replace(/
^
TypeError: Cannot read property 'replace' of undefined
at Object.htmlparser.Parser.onclosetag (/usr/lib/node_modules/my-web-component/node_modules/eslint-plugin-html/src/extract.js:42:76)
at Parser.onclosetag (/usr/lib/node_modules/my-web-component/node_modules/eslint-plugin-html/node_modules/htmlparser2/lib/Parser.js:192:28)
at Tokenizer._emitToken (/usr/lib/node_modules/my-web-component/node_modules/eslint-plugin-html/node_modules/htmlparser2/lib/Tokenizer.js:896:17)
at Tokenizer._stateInCloseingTagName (/usr/lib/node_modules/my-web-component/node_modules/eslint-plugin-html/node_modules/htmlparser2/lib/Tokenizer.js:214:8)
at Tokenizer._parse (/usr/lib/node_modules/my-web-component/node_modules/eslint-plugin-html/node_modules/htmlparser2/lib/Tokenizer.js:647:9)
at Tokenizer.write (/usr/lib/node_modules/my-web-component/node_modules/eslint-plugin-html/node_modules/htmlparser2/lib/Tokenizer.js:632:7)
at Tokenizer.end (/usr/lib/node_modules/my-web-component/node_modules/eslint-plugin-html/node_modules/htmlparser2/lib/Tokenizer.js:825:17)
at Parser.end (/usr/lib/node_modules/my-web-component/node_modules/eslint-plugin-html/node_modules/htmlparser2/lib/Parser.js:335:18)
at Parser.parseComplete (/usr/lib/node_modules/my-web-component/node_modules/eslint-plugin-html/node_modules/htmlparser2/lib/Parser.js:327:7)
at extract (/usr/lib/node_modules/my-web-component/node_modules/eslint-plugin-html/src/extract.js:78:10)
Try linting a file that has just a script tag, this is quite common when building webcomponents or polymer elements. Added an empty comment tag at the start of the file works around but this is ugly.