Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/htmlhint/chai-htmlhint

Extends Chai with assertions for HTMLHint
https://github.com/htmlhint/chai-htmlhint

chai hint htmlhint

Last synced: about 1 month ago
JSON representation

Extends Chai with assertions for HTMLHint

Awesome Lists containing this project

README

        




Chai HTMLHint


Extends Chai with assertions for HTMLHint



Travis Build Status




NPM count

MIT Licence

Chat


Chat


  How To UseContributingRoadmapWebsite

# Usage
You just have to pass the html you want to validate like this:
```javascript
var myhtml = '

my html

';
expect(myhtml).to.be.validHtml;
```

The default rules are:
```json
{
"alt-require": true,
"attr-lowercase": true,
"attr-no-duplication": true,
"attr-unsafe-chars": true,
"attr-value-double-quotes": true,
"doctype-first": true,
"doctype-html5": true,
"id-unique": true,
"inline-script-disabled": false,
"inline-style-disabled": false,
"space-tab-mixed-disabled": true,
"spec-char-escape": true,
"src-not-empty": true,
"style-disabled": true,
"tag-pair": true,
"tag-self-close": true,
"tagname-lowercase": true,
"title-require": true
};
```

If you want to override you just need a valid `.htmlhintrc` file in the root of your project

## LICENCE

Project initially created by [@molant](https://github.com/molant) and transferred to the [HTMLHint](https://github.com/htmlhint) organization.

Logo HTMLHint

[MIT License](./LICENSE)