# html-lint

> A code quality bookmarklet and command-line tool.

Latest version **2.4.2** (published 2019-12-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install html-lint
pnpm add html-lint
yarn add html-lint
bun add html-lint
```

Provides the command `html-lint`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.4.2 |
| Published | 2019-12-05 |
| First published | 2016-02-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.10.31 |
| Dependencies | 2 |
| Unpacked size | 1.2 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 19 |
| Author | Curtis Jurgensen |
| Maintainers | curtisj44 |
| Keywords | a11y, accessibility, audit, html, lint, linter, markup, report, tool |

## Links

- npm: https://www.npmjs.com/package/html-lint
- Repository: https://github.com/curtisj44/HTML-Lint
- Homepage: https://github.com/curtisj44/HTML-Lint#readme
- Issues: https://github.com/curtisj44/HTML-Lint/issues
- npm.io page: https://npm.io/package/html-lint

## Dependencies (2)

- [chalk](https://npm.io/package/chalk.md) *
- [cheerio](https://npm.io/package/cheerio.md) *

## Alternatives

- [eslint-plugin-sonarjs](https://npm.io/package/eslint-plugin-sonarjs.md) — 2.9M weekly downloads
- [eslint-config-expo](https://npm.io/package/eslint-config-expo.md) — 1.5M weekly downloads
- [@matter/protocol](https://npm.io/package/@matter/protocol.md) — 63.5K weekly downloads
- [@eventcatalog/linter](https://npm.io/package/@eventcatalog/linter.md) — 24.8K weekly downloads
- [@inrupt/eslint-config-base](https://npm.io/package/@inrupt/eslint-config-base.md) — 4.5K weekly downloads

## Recent versions

- 2.4.2 (latest) — 2019-12-05
- 2.4.1 — 2017-03-07
- 2.4.0 — 2017-03-07
- 2.3.1 — 2017-03-01
- 2.2.1 — 2017-02-22
- 2.2.0 — 2017-02-22
- 2.1.15 — 2016-07-13
- 2.1.14 — 2016-05-25
- 2.1.13 — 2016-05-25
- 2.1.12 — 2016-02-26
- 2.1.11 — 2016-02-26
- 2.1.10 — 2016-02-26
- 2.1.9 — 2016-02-26
- 2.1.8 — 2016-02-26
- 2.1.7 — 2016-02-26
- … 6 more at https://npm.io/package/html-lint/versions

## README

# 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

![Sample verbose output](cli-output-verbose.jpg)

Available on NPM: [npmjs.com/package/html-lint](https://www.npmjs.com/package/html-lint): `npm install html-lint -g`.

#### Usage

```
html-lint <url> <filename>
```

#### 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 <url>`

<!--
### Publishing

Poorly hidden notes to myself:

1. Run `npm version [major|minor|patch]` to bump the version and tag the release
1. Run `npm publish` to push the latest to NPM
-->

---
_Source: https://npm.io/package/html-lint · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
