Created
May 18, 2018 17:49
-
-
Save townivan/49ef21fe49e7c66f716d812a1fab30a7 to your computer and use it in GitHub Desktop.
Export errors from HTML_CodeSniffer.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Array.from(document.querySelectorAll(".HTMLCS-issue-detail-list li")).map((el) => { return { detail: el.querySelector(".HTMLCS-issue-title").textContent, code: el.querySelector(".HTMLCS-issue-source-inner strong").textContent } }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This code is to be run in the console once you've run HTML_CodeSniffer on a page and you filter to only show errors.
All credit to Carl Henderson for the code. It's just here so I can save it and use it later!