# template-lint

> sanity check of template html

Latest version **0.8.12** (published 2017-02-09) · (Apache-2.0) license · 0 weekly downloads

## Install

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

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.8.12 |
| Published | 2017-02-09 |
| First published | 2016-05-28 |
| Weekly downloads | 0 |
| License | (Apache-2.0) |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Meirion Hughes |
| Maintainers | meirionhughes |
| Keywords | template, html, lint, sanity, aurelia, angular2, web-component |

## Links

- npm: https://www.npmjs.com/package/template-lint
- Repository: https://github.com/MeirionHughes/template-lint
- Homepage: https://github.com/MeirionHughes/template-lint#readme
- Issues: https://github.com/MeirionHughes/template-lint/issues
- npm.io page: https://npm.io/package/template-lint

## Dependencies (3)

- [parse5](https://npm.io/package/parse5.md) 2.2.x
- [@types/node](https://npm.io/package/@types/node.md) ^6.0.34
- [@types/parse5](https://npm.io/package/@types/parse5.md) 0.0.30

## 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
- [@pandacss/eslint-plugin](https://npm.io/package/@pandacss/eslint-plugin.md) — 18.7K weekly downloads

## Recent versions

- 0.8.12 (latest) — 2017-02-09
- 1.0.0-beta.1 (beta) — 2016-09-16
- 0.8.11 — 2016-10-20
- 0.8.10 — 2016-09-30
- 0.8.9 — 2016-09-27
- 0.8.8 — 2016-08-26
- 0.8.7 — 2016-08-26
- 0.8.6 — 2016-08-25
- 0.8.5 — 2016-08-24
- 0.8.4 — 2016-08-24
- 0.8.3 — 2016-08-24
- 0.8.2 — 2016-08-24
- 0.8.1 — 2016-08-24
- 0.8.0 — 2016-08-23
- 0.7.9 — 2016-08-18
- … 22 more at https://npm.io/package/template-lint/versions

## README

# template-lint

![logo](https://d30y9cdsu7xlg0.cloudfront.net/png/30843-200.png)

Sanity check of template HTML. 

[![NPM version][npm-image]][npm-url]
[![NPM downloads][npm-downloads]][npm-url]
[![Travis Status][travis-image]][travis-url]
[![Breaks-on][breaks-image]][npm-url]
[![Stability][stability-image]][npm-url]
[![Gitter][gitter-image]][gitter-url]

##Info
This project was the result of wondering why aurelia applications had missing content when you used self-closing tags. In the end it turns out if your template html is ill formed, the browser parser will not complain and you will simply have missing content and/or an ill formed DOM element tree. 

See: 
* [StackOverflow: aurelia-self-closing-require-element-does-not-work](http://stackoverflow.com/questions/37300986/aurelia-self-closing-require-element-does-not-work)
* [StackOverflow: aurelia-sanity-check-template-html](http://stackoverflow.com/questions/37322985/aurelia-sanity-check-template-html)

The intended goal of this work is to sanity check your template html during the development cycle to highlight potential problems. 

This project serves as the basis for checking html and can be extended upon for different template flavors. 

## Rules
There are currently four rules bundled with this package:

* **SelfClose** 
  * *ensure non-void elements do not self-close* 
* **Parser**
  * *returns errors for unclosed or ill-matched elements, as captured during parsing*
* **ObsoleteTag**
  * *identify obsolete tag usage*
* **ObsoleteAttributes**
  * *identify obsolete attrubute usage*

##Usage

For use with gulp, [there is a gulp plugin available](https://github.com/MeirionHughes/gulp-template-lint)

##Compiling
Clone the repository. 
In the project root run
```
npm install
npm test
```

##VS-Code

Once installed, you can use make use of VS-Code launcher (`ctrl + f5`). Also allows you to place breakpoints on ts spec files (currently only for those files in `outDir` path in `launch.json`
  
##Icon

Icon courtesy of [The Noun Project](https://thenounproject.com/)

[npm-url]: https://npmjs.org/package/template-lint
[npm-image]: http://img.shields.io/npm/v/template-lint.svg
[npm-downloads]: http://img.shields.io/npm/dm/template-lint.svg
[travis-url]: https://travis-ci.org/MeirionHughes/template-lint
[travis-image]: https://img.shields.io/travis/MeirionHughes/template-lint/master.svg
[breaks-image]: https://img.shields.io/badge/breaks--on-minor-yellow.svg
[stability-image]: https://img.shields.io/badge/stability-2%20%3A%20unstable-red.svg
[gitter-image]: https://img.shields.io/gitter/room/MeirionHughes/template-lint.svg
[gitter-url]:https://gitter.im/MeirionHughes/template-lint

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