https://github.com/posthtml/posthtml-hint
HTML HINT Plugin
https://github.com/posthtml/posthtml-hint
Last synced: 10 months ago
JSON representation
HTML HINT Plugin
- Host: GitHub
- URL: https://github.com/posthtml/posthtml-hint
- Owner: posthtml
- License: mit
- Created: 2016-02-27T09:58:41.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2023-02-28T05:17:42.000Z (almost 3 years ago)
- Last Synced: 2024-10-29T21:06:05.253Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 947 KB
- Stars: 19
- Watchers: 4
- Forks: 2
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
[![NPM][npm]][npm-url]
[![Deps][deps]][deps-url]
[![Coverage][cover]][cover-url]
[![Standard Code Style][style]][style-url]
[![Chat][chat]][chat-badge]
# Hint Plugin 
## Install
```bash
npm i -D posthtml-hint
```
## Usage
#### Options
**Rules [String|Object]**
**[Rules Reference](https://github.com/yaniswang/HTMLHint/wiki/Rules)**
```js
const hint = require('posthtml-hint')('./path/to/.htmlhintrc')
```
## Example
```js
const { readFileSync } = require('fs')
const posthtml = require('posthtml')
const hint = require('posthtml-hint')(/* options */)
const html = readFileSync('./index.html', 'utf8')
posthtml([ hint ])
.process(html)
.then(result => console.log(result.html))
```
#### Console
```bash
PostHTML HINT
-------------
✖ error [10:12]
Special characters must be escaped : [ > ].
✖ error [12:3]
Special characters must be escaped : [ < ].
✖ error [12:21]
Special characters must be escaped : [ < ].
✖ error [12:30]
Special characters must be escaped : [ > ].
✖ error [15:17]
Tag must be paired, no start tag: [ ]
⚠ 5 Errors
```
## Maintainers
## Contributing
See [PostHTML Guidelines](https://github.com/posthtml/posthtml/tree/master/docs) and [contribution guide](CONTRIBUTING.md).
## LICENSE
[MIT](LICENSE)
[npm]: https://img.shields.io/npm/v/posthtml-hint.svg
[npm-url]: https://npmjs.com/package/posthtml-hint
[deps]: https://david-dm.org/posthtml/posthtml-hint.svg
[deps-url]: https://david-dm.org/posthtml/posthtml-hint
[travis]: http://img.shields.io/travis/posthtml/posthtml-hint.svg
[travis-url]: https://travis-ci.org/posthtml/posthtml-hint
[cover]: https://coveralls.io/repos/github/posthtml/posthtml-hint/badge.svg?branch=master
[cover-url]: https://coveralls.io/github/posthtml/posthtml-hint?branch=master
[style]: https://img.shields.io/badge/code%20style-standard-yellow.svg
[style-url]: http://standardjs.com/
[chat]: https://badges.gitter.im/posthtml/posthtml.svg
[chat-badge]: https://gitter.im/posthtml/posthtml?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge"