Skip to content

Instantly share code, notes, and snippets.

@skecskes
Created June 2, 2015 22:55
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 skecskes/0ce42623ea8667b7ac2a to your computer and use it in GitHub Desktop.
Save skecskes/0ce42623ea8667b7ac2a to your computer and use it in GitHub Desktop.
How to run bootlint on any page from browser
###What's Bootlint?
Bootlint is a tool that checks for several common HTML mistakes in webpages that are using Bootstrap in a fairly "vanilla" way. Vanilla Bootstrap's components/widgets require their parts of the DOM to conform to certain structures. Bootlint checks that instances of Bootstrap components have correctly-structured HTML. Optimal usage of Bootstrap also requires that your pages include certain <meta> tags, an HTML5 doctype declaration, etc.; Bootlint checks that these are present.
### Run in the browser
Use the following bookmarklet that's powered by BootstrapCDN:
javascript:(function(){var s=document.createElement("script");s.onload=function(){bootlint.showLintReportForCurrentDocument([]);};s.src="https://maxcdn.bootstrapcdn.com/bootlint/latest/bootlint.min.js";document.body.appendChild(s)})();
Then check the JavaScript console for lint warning messages.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment