-
Notifications
You must be signed in to change notification settings - Fork 4
/
valid.html
66 lines (66 loc) · 2.57 KB
/
valid.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>README</title>
</head>
<body>
<p><a href="https://snyk.io/test/github/lucas-c/pre-commit-hooks-nodejs"><img src="https://snyk.io/test/github/lucas-c/pre-commit-hooks-nodejs/badge.svg" alt="Known Vulnerabilities"></a></p>
<p>Useful <a href="http://pre-commit.com">pre-commit</a> hooks based on NodeJS scripts.</p>
<p>Does not require to have NodeJS installed: <code>pre-commit</code> will fetch & install it under the hood.</p>
<p>The test <code>Dockerfile</code> in this repo was taken from <a href="https://github.com/docker-library/redis/blob/master/3.2/Dockerfile">here</a>.</p>
<section id="table-of-contents">
<h2>Table of contents</h2>
<!-- toc -->
<ul>
<li><a href="#usage">Usage</a>
<ul>
<li><a href="#htmlhint">htmlhint</a></li>
<li><a href="#htmllint">htmllint</a></li>
<li><a href="#markdown-toc">markdown-toc</a></li>
</ul>
<ul>
<li><a href="#dockerfile_lint">dockerfile_lint</a></li>
</ul>
</li>
</ul>
<!-- tocstop -->
</section>
<section id="usage">
<h2>Usage</h2>
<pre><code>repos:
- repo: https://github.com/Lucas-C/pre-commit-hooks-nodejs
rev: v1.1.1
hooks:
- id: htmlhint
# optional custom config:
args: [--config, .htmlhintrc]
- id: htmllint
- id: markdown-toc
- id: dockerfile_lint
# optional custom config:
args: [--json, --verbose, --dockerfile]
</code></pre>
<section id="htmlhint">
<h4>htmlhint</h4>
<p>Regex-based linter: <a href="https://github.com/yaniswang/HTMLHint">https://github.com/yaniswang/HTMLHint</a></p>
</section>
<section id="htmllint">
<h4>htmllint</h4>
<p>Uses <a href="https://github.com/fb55/htmlparser2">htmlparser2</a>-based linter: <a href="https://github.com/htmllint/htmllint/wiki/Options">htmllint</a>.</p>
<p>Requires you to have a config file like <a href="https://github.com/htmllint/htmllint-cli/blob/master/lib/default_cfg.json">this default <code>.htmllintrc</code></a>.</p>
</section>
<section id="markdown-toc">
<h4>markdown-toc</h4>
<p>By default, a table of content will be inserted in your repo root <code>README.md</code>,
injecting the TOC on lines with: “<!-- toc →”</p>
<p>When the TOC is added or updated, the hook will fail with <code>Files were modified by this hook</code>.
You then just have to <code>git add</code> your <code>README.md</code> and commit again (or <code>git commit -a</code>).</p>
</section>
<section id="dockerfile-lint">
<h3>dockerfile_lint</h3>
<p>Simply call the latest version of <a href="https://github.com/projectatomic/dockerfile_lint">dockerfile_lint</a></p>
</section>
</section>
</body>
</html>