Opinionated in-browser code validator
Browser extension to validate (simple) webpages. Validating on HTML and CSS syntax errors and code standards.
Main validation code is located in: source/validate.js
Based on: https://github.com/notlmn/browser-extension-template
- Clone this repo
- Go to browser extension settings and load this extension's manifest.json file in the source folder
- A new debug tools panel should appear where validation results appear of that page
HtML gets send to https://validator.w3.org/nu/
Checked if there is an <h1>
Finds and validates CSS classnames
TODO
- Add more non-descriptive classnames
- Improve detection using partial match
Duplicate CSS is found by comparing all CSS code blocks with eachother
Try to detect use of magic numbers (like margin-left: 23.5%
)
font-size
which are sometimes defined in rem and sometimes in px
Maybe find a menu element which is not a <nav>
Classes all the way except when there is no other way
Detect classnames and ids written with capitals
Try to detect comment which are not informative, but just 'old' code