https://github.com/curtisj44/html-lint
A code quality bookmarklet and command-line tool
https://github.com/curtisj44/html-lint
a11y accessibility audit bookmarklet cli html javascript lint
Last synced: about 1 year ago
JSON representation
A code quality bookmarklet and command-line tool
- Host: GitHub
- URL: https://github.com/curtisj44/html-lint
- Owner: curtisj44
- License: mit
- Created: 2012-01-18T03:43:38.000Z (over 14 years ago)
- Default Branch: master
- Last Pushed: 2021-09-28T21:16:19.000Z (over 4 years ago)
- Last Synced: 2025-05-13T13:19:47.000Z (about 1 year ago)
- Topics: a11y, accessibility, audit, bookmarklet, cli, html, javascript, lint
- Language: HTML
- Homepage:
- Size: 440 KB
- Stars: 21
- Watchers: 2
- Forks: 5
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# HTML-Lint
[](https://www.npmjs.com/package/html-lint)
[](https://www.npmjs.com/package/html-lint)
HTML-Lint is a tool designed to supplement HTML validation by identify coding practices that pass validation, but are less than ideal.
## How to Use:
### Option 1: Bookmarklet
1. Copy the code below:
```js
javascript: (function(){'use strict';var script = document.createElement('script');script.src = 'https://curtisj44.github.io/HTML-Lint/dist/htmlLint.min.js';script.id = 'html-lint-js';document.body.appendChild(script);}());
```
1. Create a new bookmark.
1. Set the name to “HTML-Lint” and paste the above as the URL.
### Option 2: CLI

Available on NPM: [npmjs.com/package/html-lint](https://www.npmjs.com/package/html-lint): `npm install html-lint -g`.
#### Usage
```
html-lint
```
#### Options
```
--strict Return a non-zero exit code if lint errors are found
--verbose Enable verbose output
```
#### Examples
```
html-lint http://www.google.com
html-lint http://www.google.com --verbose
html-lint http://www.google.com foo
```
---
## Development
### Getting Started
1. Have the following requirements installed: [Node](http://nodejs.org/), [NPM](https://www.npmjs.org/), and [PhantomJS](http://phantomjs.org/)
1. Clone the repo: `git clone https://github.com/curtisj44/HTML-Lint.git`
1. Run `npm install`
1. Run `gulp`
### Tasks
- `gulp` → compiles Sass to CSS, concatenates JS, minifies CSS and JS, and watches
- `gulp watch` → runs default `gulp` task and then watches for changes
### Testing the CLI locally
1. Run `node html-lint.js `