respimagelint: Lint report seems to be broken (blank page with JS errors)
Have tried this linter out on multiple websites (for example: http://srcset.salcode.com/). Each time the lint report seems to fail with a JS console error like the below:
Uncaught SyntaxError: Unexpected token r in JSON at position 0
at JSON.parse (<anonymous>)
at Object.114../linter/index (linter.js:347:253)
at o (linter.js:1:265)
at r (linter.js:1:431)
at linter.js:1:460
OS: MacOS 12.3.1 Browsers: Firefox 99.0.1, Brave 1.37.116, Safari 15.4
About this issue
- Original URL
- State: open
- Created 2 years ago
- Comments: 25 (4 by maintainers)
Hi – if found a cause for this tool to fail. Check your css media queries for hacks like this:
/*ie8 hack start*/ /* Prevent height distortion in IE8. */ @media \0screen {img { width: auto }} /*ie8 hack end*/
After removing this from my stylesheets the lint report is working well on latest chrome. There may be other css hacks that cause the tool to fail. You can check your css for invalid content with: jigsaw css validator regards theo
I was not able to reproduce that.