Skip to content

Instantly share code, notes, and snippets.

@townivan
Created May 18, 2018 17:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save townivan/49ef21fe49e7c66f716d812a1fab30a7 to your computer and use it in GitHub Desktop.
Save townivan/49ef21fe49e7c66f716d812a1fab30a7 to your computer and use it in GitHub Desktop.
Export errors from HTML_CodeSniffer.
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 } })
@townivan
Copy link
Author

townivan commented May 18, 2018

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment