From 59d55ca43d96bbdbe49a6c4d43d9da040c725f36 Mon Sep 17 00:00:00 2001 From: Christopher Quadflieg Date: Fri, 10 Jul 2020 19:31:06 +0200 Subject: [PATCH] test: update tests --- test/cli/formatters/checkstyle.spec.js | 2 +- test/cli/formatters/checkstyle.xml | 36 ++--- test/cli/formatters/compact.spec.js | 2 +- test/cli/formatters/compact.txt | 150 +++++++++--------- test/cli/formatters/default.spec.js | 2 +- test/cli/formatters/html.html | 2 +- test/cli/formatters/html.spec.js | 2 +- test/cli/formatters/json.json | 64 ++++---- test/cli/formatters/json.spec.js | 2 +- test/cli/formatters/junit.spec.js | 2 +- test/cli/formatters/markdown.spec.js | 4 +- test/cli/formatters/unix.spec.js | 2 +- test/cli/formatters/unix.txt | 150 +++++++++--------- test/htmlparser.spec.js | 1 + test/rules/alt-require.spec.js | 1 + test/rules/attr-lowercase.spec.js | 1 + test/rules/attr-no-duplication.spec.js | 1 + .../attr-no-unnecessary-whitespace.spec.js | 1 + test/rules/attr-sort.spec.js | 1 + test/rules/attr-unsafe-chars.spec.js | 1 + test/rules/attr-value-double-quotes.spec.js | 1 + test/rules/attr-value-not-empty.spec.js | 1 + test/rules/attr-value-single-quotes.spec.js | 1 + test/rules/attr-whitespace.spec.js | 1 + test/rules/default.spec.js | 5 +- test/rules/doctype-first.spec.js | 1 + test/rules/doctype-html5.spec.js | 1 + test/rules/head-require.spec.js | 1 + test/rules/head-script-disabled.spec.js | 1 + test/rules/href-abs-or-rel.spec.js | 1 + test/rules/id-class-ad-disabled.spec.js | 1 + test/rules/id-class-value.spec.js | 1 + test/rules/id-unique.spec.js | 1 + test/rules/inline-script-disabled.spec.js | 1 + test/rules/inline-style-disabled.spec.js | 1 + test/rules/input-requires-label.spec.js | 1 + test/rules/script-disabled.spec.js | 1 + test/rules/space-tab-mixed-disabled.spec.js | 1 + test/rules/spec-char-escape.spec.js | 1 + test/rules/src-not-empty.spec.js | 1 + test/rules/style-disabled.spec.js | 1 + test/rules/tag-pair.spec.js | 1 + test/rules/tag-self-close.spec.js | 1 + test/rules/tagname-lowercase.spec.js | 1 + test/rules/tagname-specialchars.spec.js | 1 + test/rules/tags-check.spec.js | 1 + test/rules/title-require.spec.js | 1 + 47 files changed, 246 insertions(+), 212 deletions(-) diff --git a/test/cli/formatters/checkstyle.spec.js b/test/cli/formatters/checkstyle.spec.js index 7ab2af9b7..35dd11aba 100644 --- a/test/cli/formatters/checkstyle.spec.js +++ b/test/cli/formatters/checkstyle.spec.js @@ -6,7 +6,7 @@ const path = require('path') describe('CLI', () => { describe('Formatter: checkstyle', () => { - it('should have stdout output with formatter checkstyle', (done) => { + it('Should have stdout output with formatter checkstyle', (done) => { const expected = fs .readFileSync(path.resolve(__dirname, 'checkstyle.xml'), 'utf8') .replace('{{path}}', path.resolve(__dirname, 'example.html')) diff --git a/test/cli/formatters/checkstyle.xml b/test/cli/formatters/checkstyle.xml index aa96f0fc7..5d8fdcbfd 100644 --- a/test/cli/formatters/checkstyle.xml +++ b/test/cli/formatters/checkstyle.xml @@ -1,25 +1,25 @@ - - - - + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + diff --git a/test/cli/formatters/compact.spec.js b/test/cli/formatters/compact.spec.js index cd0f8d324..dcb1ebcc6 100644 --- a/test/cli/formatters/compact.spec.js +++ b/test/cli/formatters/compact.spec.js @@ -6,7 +6,7 @@ const path = require('path') describe('CLI', () => { describe('Formatter: compact', () => { - it('should have stdout output with formatter compact', (done) => { + it('Should have stdout output with formatter compact', (done) => { const expected = fs .readFileSync(path.resolve(__dirname, 'compact.txt'), 'utf8') .replace( diff --git a/test/cli/formatters/compact.txt b/test/cli/formatters/compact.txt index 07dee1834..6d850ffc6 100644 --- a/test/cli/formatters/compact.txt +++ b/test/cli/formatters/compact.txt @@ -1,94 +1,94 @@ -{{path}}: line 8, col 7, error - The value of attribute [ bad ] must be in double quotes. (attr-value-double-quotes) -{{path}}: line 8, col 14, error - The value of attribute [ bad ] must be in double quotes. (attr-value-double-quotes) {{path}}: line 8, col 14, error - Duplicate of attribute name [ bad ] was found. (attr-no-duplication) -{{path}}: line 9, col 7, error - The value of attribute [ bad ] must be in double quotes. (attr-value-double-quotes) -{{path}}: line 9, col 14, error - The value of attribute [ bad ] must be in double quotes. (attr-value-double-quotes) +{{path}}: line 8, col 7, warning - The value of attribute [ bad ] must be in double quotes. (attr-value-double-quotes) +{{path}}: line 8, col 14, warning - The value of attribute [ bad ] must be in double quotes. (attr-value-double-quotes) {{path}}: line 9, col 14, error - Duplicate of attribute name [ bad ] was found. (attr-no-duplication) -{{path}}: line 10, col 7, error - The value of attribute [ bad ] must be in double quotes. (attr-value-double-quotes) -{{path}}: line 10, col 14, error - The value of attribute [ bad ] must be in double quotes. (attr-value-double-quotes) +{{path}}: line 9, col 7, warning - The value of attribute [ bad ] must be in double quotes. (attr-value-double-quotes) +{{path}}: line 9, col 14, warning - The value of attribute [ bad ] must be in double quotes. (attr-value-double-quotes) {{path}}: line 10, col 14, error - Duplicate of attribute name [ bad ] was found. (attr-no-duplication) -{{path}}: line 11, col 7, error - The value of attribute [ bad ] must be in double quotes. (attr-value-double-quotes) -{{path}}: line 11, col 14, error - The value of attribute [ bad ] must be in double quotes. (attr-value-double-quotes) +{{path}}: line 10, col 7, warning - The value of attribute [ bad ] must be in double quotes. (attr-value-double-quotes) +{{path}}: line 10, col 14, warning - The value of attribute [ bad ] must be in double quotes. (attr-value-double-quotes) {{path}}: line 11, col 14, error - Duplicate of attribute name [ bad ] was found. (attr-no-duplication) -{{path}}: line 12, col 7, error - The value of attribute [ bad ] must be in double quotes. (attr-value-double-quotes) -{{path}}: line 12, col 14, error - The value of attribute [ bad ] must be in double quotes. (attr-value-double-quotes) +{{path}}: line 11, col 7, warning - The value of attribute [ bad ] must be in double quotes. (attr-value-double-quotes) +{{path}}: line 11, col 14, warning - The value of attribute [ bad ] must be in double quotes. (attr-value-double-quotes) {{path}}: line 12, col 14, error - Duplicate of attribute name [ bad ] was found. (attr-no-duplication) -{{path}}: line 13, col 7, error - The value of attribute [ bad ] must be in double quotes. (attr-value-double-quotes) -{{path}}: line 13, col 14, error - The value of attribute [ bad ] must be in double quotes. (attr-value-double-quotes) +{{path}}: line 12, col 7, warning - The value of attribute [ bad ] must be in double quotes. (attr-value-double-quotes) +{{path}}: line 12, col 14, warning - The value of attribute [ bad ] must be in double quotes. (attr-value-double-quotes) {{path}}: line 13, col 14, error - Duplicate of attribute name [ bad ] was found. (attr-no-duplication) -{{path}}: line 14, col 7, error - The value of attribute [ bad ] must be in double quotes. (attr-value-double-quotes) -{{path}}: line 14, col 14, error - The value of attribute [ bad ] must be in double quotes. (attr-value-double-quotes) +{{path}}: line 13, col 7, warning - The value of attribute [ bad ] must be in double quotes. (attr-value-double-quotes) +{{path}}: line 13, col 14, warning - The value of attribute [ bad ] must be in double quotes. (attr-value-double-quotes) {{path}}: line 14, col 14, error - Duplicate of attribute name [ bad ] was found. (attr-no-duplication) -{{path}}: line 15, col 7, error - The value of attribute [ bad ] must be in double quotes. (attr-value-double-quotes) -{{path}}: line 15, col 14, error - The value of attribute [ bad ] must be in double quotes. (attr-value-double-quotes) +{{path}}: line 14, col 7, warning - The value of attribute [ bad ] must be in double quotes. (attr-value-double-quotes) +{{path}}: line 14, col 14, warning - The value of attribute [ bad ] must be in double quotes. (attr-value-double-quotes) {{path}}: line 15, col 14, error - Duplicate of attribute name [ bad ] was found. (attr-no-duplication) -{{path}}: line 16, col 7, error - The value of attribute [ bad ] must be in double quotes. (attr-value-double-quotes) -{{path}}: line 16, col 14, error - The value of attribute [ bad ] must be in double quotes. (attr-value-double-quotes) +{{path}}: line 15, col 7, warning - The value of attribute [ bad ] must be in double quotes. (attr-value-double-quotes) +{{path}}: line 15, col 14, warning - The value of attribute [ bad ] must be in double quotes. (attr-value-double-quotes) {{path}}: line 16, col 14, error - Duplicate of attribute name [ bad ] was found. (attr-no-duplication) -{{path}}: line 17, col 7, error - The value of attribute [ bad ] must be in double quotes. (attr-value-double-quotes) -{{path}}: line 17, col 14, error - The value of attribute [ bad ] must be in double quotes. (attr-value-double-quotes) +{{path}}: line 16, col 7, warning - The value of attribute [ bad ] must be in double quotes. (attr-value-double-quotes) +{{path}}: line 16, col 14, warning - The value of attribute [ bad ] must be in double quotes. (attr-value-double-quotes) {{path}}: line 17, col 14, error - Duplicate of attribute name [ bad ] was found. (attr-no-duplication) -{{path}}: line 18, col 7, error - The value of attribute [ bad ] must be in double quotes. (attr-value-double-quotes) -{{path}}: line 18, col 14, error - The value of attribute [ bad ] must be in double quotes. (attr-value-double-quotes) +{{path}}: line 17, col 7, warning - The value of attribute [ bad ] must be in double quotes. (attr-value-double-quotes) +{{path}}: line 17, col 14, warning - The value of attribute [ bad ] must be in double quotes. (attr-value-double-quotes) {{path}}: line 18, col 14, error - Duplicate of attribute name [ bad ] was found. (attr-no-duplication) -{{path}}: line 19, col 7, error - The value of attribute [ bad ] must be in double quotes. (attr-value-double-quotes) -{{path}}: line 19, col 14, error - The value of attribute [ bad ] must be in double quotes. (attr-value-double-quotes) +{{path}}: line 18, col 7, warning - The value of attribute [ bad ] must be in double quotes. (attr-value-double-quotes) +{{path}}: line 18, col 14, warning - The value of attribute [ bad ] must be in double quotes. (attr-value-double-quotes) {{path}}: line 19, col 14, error - Duplicate of attribute name [ bad ] was found. (attr-no-duplication) -{{path}}: line 20, col 7, error - The value of attribute [ bad ] must be in double quotes. (attr-value-double-quotes) -{{path}}: line 20, col 14, error - The value of attribute [ bad ] must be in double quotes. (attr-value-double-quotes) +{{path}}: line 19, col 7, warning - The value of attribute [ bad ] must be in double quotes. (attr-value-double-quotes) +{{path}}: line 19, col 14, warning - The value of attribute [ bad ] must be in double quotes. (attr-value-double-quotes) {{path}}: line 20, col 14, error - Duplicate of attribute name [ bad ] was found. (attr-no-duplication) -{{path}}: line 21, col 7, error - The value of attribute [ bad ] must be in double quotes. (attr-value-double-quotes) -{{path}}: line 21, col 14, error - The value of attribute [ bad ] must be in double quotes. (attr-value-double-quotes) +{{path}}: line 20, col 7, warning - The value of attribute [ bad ] must be in double quotes. (attr-value-double-quotes) +{{path}}: line 20, col 14, warning - The value of attribute [ bad ] must be in double quotes. (attr-value-double-quotes) {{path}}: line 21, col 14, error - Duplicate of attribute name [ bad ] was found. (attr-no-duplication) -{{path}}: line 22, col 7, error - The value of attribute [ bad ] must be in double quotes. (attr-value-double-quotes) -{{path}}: line 22, col 14, error - The value of attribute [ bad ] must be in double quotes. (attr-value-double-quotes) +{{path}}: line 21, col 7, warning - The value of attribute [ bad ] must be in double quotes. (attr-value-double-quotes) +{{path}}: line 21, col 14, warning - The value of attribute [ bad ] must be in double quotes. (attr-value-double-quotes) {{path}}: line 22, col 14, error - Duplicate of attribute name [ bad ] was found. (attr-no-duplication) -{{path}}: line 23, col 7, error - The value of attribute [ bad ] must be in double quotes. (attr-value-double-quotes) -{{path}}: line 23, col 14, error - The value of attribute [ bad ] must be in double quotes. (attr-value-double-quotes) +{{path}}: line 22, col 7, warning - The value of attribute [ bad ] must be in double quotes. (attr-value-double-quotes) +{{path}}: line 22, col 14, warning - The value of attribute [ bad ] must be in double quotes. (attr-value-double-quotes) {{path}}: line 23, col 14, error - Duplicate of attribute name [ bad ] was found. (attr-no-duplication) -{{path}}: line 24, col 7, error - The value of attribute [ bad ] must be in double quotes. (attr-value-double-quotes) -{{path}}: line 24, col 14, error - The value of attribute [ bad ] must be in double quotes. (attr-value-double-quotes) +{{path}}: line 23, col 7, warning - The value of attribute [ bad ] must be in double quotes. (attr-value-double-quotes) +{{path}}: line 23, col 14, warning - The value of attribute [ bad ] must be in double quotes. (attr-value-double-quotes) {{path}}: line 24, col 14, error - Duplicate of attribute name [ bad ] was found. (attr-no-duplication) -{{path}}: line 25, col 22, error - Tag must be paired, no start tag: [ ] (tag-pair) -{{path}}: line 26, col 3, error - Special characters must be escaped : [ < ]. (spec-char-escape) -{{path}}: line 26, col 18, error - Special characters must be escaped : [ > ]. (spec-char-escape) -{{path}}: line 28, col 11, error - Tag must be paired, no start tag: [ ] (tag-pair) -{{path}}: line 29, col 9, error - Tag must be paired, no start tag: [ ] (tag-pair) -{{path}}: line 30, col 7, error - Tag must be paired, no start tag: [ ] (tag-pair) -{{path}}: line 31, col 5, error - Tag must be paired, no start tag: [ ] (tag-pair) -{{path}}: line 32, col 3, error - Tag must be paired, no start tag: [ ] (tag-pair) -{{path}}: line 38, col 19, error - The value of attribute [ class ] must be in double quotes. (attr-value-double-quotes) -{{path}}: line 38, col 28, error - The value of attribute [ what ] must be in double quotes. (attr-value-double-quotes) -{{path}}: line 38, col 36, error - The value of attribute [ something ] must be in double quotes. (attr-value-double-quotes) -{{path}}: line 44, col 3, error - Tag must be paired, no start tag: [ ] (tag-pair) -{{path}}: line 50, col 19, error - The value of attribute [ class ] must be in double quotes. (attr-value-double-quotes) -{{path}}: line 50, col 28, error - The value of attribute [ what ] must be in double quotes. (attr-value-double-quotes) -{{path}}: line 50, col 36, error - The value of attribute [ something ] must be in double quotes. (attr-value-double-quotes) -{{path}}: line 56, col 3, error - Tag must be paired, no start tag: [ ] (tag-pair) -{{path}}: line 62, col 19, error - The value of attribute [ class ] must be in double quotes. (attr-value-double-quotes) -{{path}}: line 62, col 28, error - The value of attribute [ what ] must be in double quotes. (attr-value-double-quotes) -{{path}}: line 62, col 36, error - The value of attribute [ something ] must be in double quotes. (attr-value-double-quotes) -{{path}}: line 68, col 3, error - Tag must be paired, no start tag: [ ] (tag-pair) -{{path}}: line 74, col 19, error - The value of attribute [ class ] must be in double quotes. (attr-value-double-quotes) -{{path}}: line 74, col 28, error - The value of attribute [ what ] must be in double quotes. (attr-value-double-quotes) -{{path}}: line 74, col 36, error - The value of attribute [ something ] must be in double quotes. (attr-value-double-quotes) -{{path}}: line 80, col 3, error - Tag must be paired, no start tag: [ ] (tag-pair) -{{path}}: line 81, col 1, error - Tag must be paired, no start tag: [ ] (tag-pair) -{{path}}: line 82, col 1, error - Tag must be paired, no start tag: [ ] (tag-pair) -{{path}}: line 83, col 1, error - Tag must be paired, no start tag: [ ] (tag-pair) -{{path}}: line 84, col 1, error - Tag must be paired, no start tag: [ ] (tag-pair) -{{path}}: line 85, col 1, error - Tag must be paired, no start tag: [ ] (tag-pair) -{{path}}: line 86, col 1, error - Tag must be paired, no start tag: [ ] (tag-pair) -{{path}}: line 87, col 1, error - Tag must be paired, no start tag: [ ] (tag-pair) -{{path}}: line 88, col 1, error - Tag must be paired, no start tag: [ ] (tag-pair) -{{path}}: line 89, col 1, error - Tag must be paired, no start tag: [ ] (tag-pair) -{{path}}: line 90, col 1, error - Tag must be paired, no start tag: [ ] (tag-pair) -{{path}}: line 91, col 1, error - Tag must be paired, no start tag: [ ] (tag-pair) -{{path}}: line 92, col 1, error - Tag must be paired, no start tag: [ ] (tag-pair) -{{path}}: line 93, col 1, error - Tag must be paired, no start tag: [ ] (tag-pair) -{{path}}: line 94, col 1, error - Tag must be paired, no start tag: [ ] (tag-pair) -{{path}}: line 95, col 1, error - Tag must be paired, no start tag: [ ] (tag-pair) -{{path}}: line 96, col 1, error - Tag must be paired, no start tag: [ ] (tag-pair) -{{path}}: line 97, col 1, error - Tag must be paired, no start tag: [ ] (tag-pair) +{{path}}: line 24, col 7, warning - The value of attribute [ bad ] must be in double quotes. (attr-value-double-quotes) +{{path}}: line 24, col 14, warning - The value of attribute [ bad ] must be in double quotes. (attr-value-double-quotes) +{{path}}: line 25, col 22, warning - Tag must be paired, no start tag: [ ] (tag-pair) +{{path}}: line 26, col 3, warning - Special characters must be escaped : [ < ]. (spec-char-escape) +{{path}}: line 26, col 18, warning - Special characters must be escaped : [ > ]. (spec-char-escape) +{{path}}: line 28, col 11, warning - Tag must be paired, no start tag: [ ] (tag-pair) +{{path}}: line 29, col 9, warning - Tag must be paired, no start tag: [ ] (tag-pair) +{{path}}: line 30, col 7, warning - Tag must be paired, no start tag: [ ] (tag-pair) +{{path}}: line 31, col 5, warning - Tag must be paired, no start tag: [ ] (tag-pair) +{{path}}: line 32, col 3, warning - Tag must be paired, no start tag: [ ] (tag-pair) +{{path}}: line 38, col 19, warning - The value of attribute [ class ] must be in double quotes. (attr-value-double-quotes) +{{path}}: line 38, col 28, warning - The value of attribute [ what ] must be in double quotes. (attr-value-double-quotes) +{{path}}: line 38, col 36, warning - The value of attribute [ something ] must be in double quotes. (attr-value-double-quotes) +{{path}}: line 44, col 3, warning - Tag must be paired, no start tag: [ ] (tag-pair) +{{path}}: line 50, col 19, warning - The value of attribute [ class ] must be in double quotes. (attr-value-double-quotes) +{{path}}: line 50, col 28, warning - The value of attribute [ what ] must be in double quotes. (attr-value-double-quotes) +{{path}}: line 50, col 36, warning - The value of attribute [ something ] must be in double quotes. (attr-value-double-quotes) +{{path}}: line 56, col 3, warning - Tag must be paired, no start tag: [ ] (tag-pair) +{{path}}: line 62, col 19, warning - The value of attribute [ class ] must be in double quotes. (attr-value-double-quotes) +{{path}}: line 62, col 28, warning - The value of attribute [ what ] must be in double quotes. (attr-value-double-quotes) +{{path}}: line 62, col 36, warning - The value of attribute [ something ] must be in double quotes. (attr-value-double-quotes) +{{path}}: line 68, col 3, warning - Tag must be paired, no start tag: [ ] (tag-pair) +{{path}}: line 74, col 19, warning - The value of attribute [ class ] must be in double quotes. (attr-value-double-quotes) +{{path}}: line 74, col 28, warning - The value of attribute [ what ] must be in double quotes. (attr-value-double-quotes) +{{path}}: line 74, col 36, warning - The value of attribute [ something ] must be in double quotes. (attr-value-double-quotes) +{{path}}: line 80, col 3, warning - Tag must be paired, no start tag: [ ] (tag-pair) +{{path}}: line 81, col 1, warning - Tag must be paired, no start tag: [ ] (tag-pair) +{{path}}: line 82, col 1, warning - Tag must be paired, no start tag: [ ] (tag-pair) +{{path}}: line 83, col 1, warning - Tag must be paired, no start tag: [ ] (tag-pair) +{{path}}: line 84, col 1, warning - Tag must be paired, no start tag: [ ] (tag-pair) +{{path}}: line 85, col 1, warning - Tag must be paired, no start tag: [ ] (tag-pair) +{{path}}: line 86, col 1, warning - Tag must be paired, no start tag: [ ] (tag-pair) +{{path}}: line 87, col 1, warning - Tag must be paired, no start tag: [ ] (tag-pair) +{{path}}: line 88, col 1, warning - Tag must be paired, no start tag: [ ] (tag-pair) +{{path}}: line 89, col 1, warning - Tag must be paired, no start tag: [ ] (tag-pair) +{{path}}: line 90, col 1, warning - Tag must be paired, no start tag: [ ] (tag-pair) +{{path}}: line 91, col 1, warning - Tag must be paired, no start tag: [ ] (tag-pair) +{{path}}: line 92, col 1, warning - Tag must be paired, no start tag: [ ] (tag-pair) +{{path}}: line 93, col 1, warning - Tag must be paired, no start tag: [ ] (tag-pair) +{{path}}: line 94, col 1, warning - Tag must be paired, no start tag: [ ] (tag-pair) +{{path}}: line 95, col 1, warning - Tag must be paired, no start tag: [ ] (tag-pair) +{{path}}: line 96, col 1, warning - Tag must be paired, no start tag: [ ] (tag-pair) +{{path}}: line 97, col 1, warning - Tag must be paired, no start tag: [ ] (tag-pair) \u001b[31m92 problems\u001b[39m diff --git a/test/cli/formatters/default.spec.js b/test/cli/formatters/default.spec.js index 0c84c1da4..caa41e39c 100644 --- a/test/cli/formatters/default.spec.js +++ b/test/cli/formatters/default.spec.js @@ -5,7 +5,7 @@ const path = require('path') describe('CLI', () => { describe('Formatter: default', () => { - it('should have stdout output with formatter default', (done) => { + it('Should have stdout output with formatter default', (done) => { ChildProcess.exec( [ 'node', diff --git a/test/cli/formatters/html.html b/test/cli/formatters/html.html index b335e82d2..ec71e2f65 100644 --- a/test/cli/formatters/html.html +++ b/test/cli/formatters/html.html @@ -1 +1 @@ -HTML Hint Violation Report

Violation Report

Number#File NameLine NumberMessage
1{{path}}8The value of attribute [ bad ] must be in double quotes.
2{{path}}8The value of attribute [ bad ] must be in double quotes.
3{{path}}8Duplicate of attribute name [ bad ] was found.
4{{path}}9The value of attribute [ bad ] must be in double quotes.
5{{path}}9The value of attribute [ bad ] must be in double quotes.
6{{path}}9Duplicate of attribute name [ bad ] was found.
7{{path}}10Tag must be paired, no start tag: [ ]
8{{path}}11Special characters must be escaped : [ < ].
9{{path}}11Special characters must be escaped : [ > ].
10{{path}}13Tag must be paired, no start tag: [ ]
11{{path}}14Tag must be paired, no start tag: [ ]
12{{path}}15Tag must be paired, no start tag: [ ]
13{{path}}16Tag must be paired, no start tag: [ ]
14{{path}}17Tag must be paired, no start tag: [ ]
15{{path}}21The value of attribute [ class ] must be in double quotes.
16{{path}}21The value of attribute [ what ] must be in double quotes.
17{{path}}21The value of attribute [ something ] must be in double quotes.
18{{path}}25Tag must be paired, no start tag: [ ]
19{{path}}26Tag must be paired, no start tag: [ ]
20{{path}}27Tag must be paired, no start tag: [ ]
+HTML Hint Violation Report

Violation Report

Number#File NameLine NumberMessage
1{{path}}8Duplicate of attribute name [ bad ] was found.
2{{path}}8The value of attribute [ bad ] must be in double quotes.
3{{path}}8The value of attribute [ bad ] must be in double quotes.
4{{path}}9Duplicate of attribute name [ bad ] was found.
5{{path}}9The value of attribute [ bad ] must be in double quotes.
6{{path}}9The value of attribute [ bad ] must be in double quotes.
7{{path}}10Tag must be paired, no start tag: [ ]
8{{path}}11Special characters must be escaped : [ < ].
9{{path}}11Special characters must be escaped : [ > ].
10{{path}}13Tag must be paired, no start tag: [ ]
11{{path}}14Tag must be paired, no start tag: [ ]
12{{path}}15Tag must be paired, no start tag: [ ]
13{{path}}16Tag must be paired, no start tag: [ ]
14{{path}}17Tag must be paired, no start tag: [ ]
15{{path}}21The value of attribute [ class ] must be in double quotes.
16{{path}}21The value of attribute [ what ] must be in double quotes.
17{{path}}21The value of attribute [ something ] must be in double quotes.
18{{path}}25Tag must be paired, no start tag: [ ]
19{{path}}26Tag must be paired, no start tag: [ ]
20{{path}}27Tag must be paired, no start tag: [ ]
diff --git a/test/cli/formatters/html.spec.js b/test/cli/formatters/html.spec.js index 67e38d171..d780de863 100644 --- a/test/cli/formatters/html.spec.js +++ b/test/cli/formatters/html.spec.js @@ -6,7 +6,7 @@ const path = require('path') describe('CLI', () => { describe('Formatter: html', () => { - it('should have stdout output with formatter html', (done) => { + it('Should have stdout output with formatter html', (done) => { const expected = fs .readFileSync(path.resolve(__dirname, 'html.html'), 'utf8') .replace(/\{\{path\}\}/g, path.resolve(__dirname, 'example.html')) diff --git a/test/cli/formatters/json.json b/test/cli/formatters/json.json index 8744fe391..f8446bd10 100644 --- a/test/cli/formatters/json.json +++ b/test/cli/formatters/json.json @@ -4,6 +4,19 @@ "messages": [ { "type": "error", + "message": "Duplicate of attribute name [ bad ] was found.", + "raw": " bad=''", + "evidence": "
", + "line": 8, + "col": 14, + "rule": { + "id": "attr-no-duplication", + "description": "Elements cannot have duplicate attributes.", + "link": "https://github.com/thedaviddias/HTMLHint/wiki/attr-no-duplication" + } + }, + { + "type": "warning", "message": "The value of attribute [ bad ] must be in double quotes.", "raw": " bad=''", "evidence": "
", @@ -16,7 +29,7 @@ } }, { - "type": "error", + "type": "warning", "message": "The value of attribute [ bad ] must be in double quotes.", "raw": " bad=''", "evidence": "
", @@ -33,7 +46,7 @@ "message": "Duplicate of attribute name [ bad ] was found.", "raw": " bad=''", "evidence": "
", - "line": 8, + "line": 9, "col": 14, "rule": { "id": "attr-no-duplication", @@ -42,7 +55,7 @@ } }, { - "type": "error", + "type": "warning", "message": "The value of attribute [ bad ] must be in double quotes.", "raw": " bad=''", "evidence": "
", @@ -55,7 +68,7 @@ } }, { - "type": "error", + "type": "warning", "message": "The value of attribute [ bad ] must be in double quotes.", "raw": " bad=''", "evidence": "
", @@ -68,20 +81,7 @@ } }, { - "type": "error", - "message": "Duplicate of attribute name [ bad ] was found.", - "raw": " bad=''", - "evidence": "
", - "line": 9, - "col": 14, - "rule": { - "id": "attr-no-duplication", - "description": "Elements cannot have duplicate attributes.", - "link": "https://github.com/thedaviddias/HTMLHint/wiki/attr-no-duplication" - } - }, - { - "type": "error", + "type": "warning", "message": "Tag must be paired, no start tag: [ ]", "raw": "", "evidence": " ", @@ -94,7 +94,7 @@ } }, { - "type": "error", + "type": "warning", "message": "Special characters must be escaped : [ < ].", "raw": "\n
\n\n ", "evidence": "
", @@ -107,7 +107,7 @@ } }, { - "type": "error", + "type": "warning", "message": "Special characters must be escaped : [ > ].", "raw": "\n
\n\n ", "evidence": "
", @@ -120,7 +120,7 @@ } }, { - "type": "error", + "type": "warning", "message": "Tag must be paired, no start tag: [
]", "raw": "
", "evidence": "
", @@ -133,7 +133,7 @@ } }, { - "type": "error", + "type": "warning", "message": "Tag must be paired, no start tag: [
]", "raw": "", "evidence": " ", @@ -146,7 +146,7 @@ } }, { - "type": "error", + "type": "warning", "message": "Tag must be paired, no start tag: [ ]", "raw": "", "evidence": " ", @@ -159,7 +159,7 @@ } }, { - "type": "error", + "type": "warning", "message": "Tag must be paired, no start tag: [ ]", "raw": "", "evidence": " ", @@ -172,7 +172,7 @@ } }, { - "type": "error", + "type": "warning", "message": "Tag must be paired, no start tag: [ ]", "raw": "", "evidence": " ", @@ -185,7 +185,7 @@ } }, { - "type": "error", + "type": "warning", "message": "The value of attribute [ class ] must be in double quotes.", "raw": " class=''", "evidence": "
", @@ -198,7 +198,7 @@ } }, { - "type": "error", + "type": "warning", "message": "The value of attribute [ what ] must be in double quotes.", "raw": " what=''", "evidence": "
", @@ -211,7 +211,7 @@ } }, { - "type": "error", + "type": "warning", "message": "The value of attribute [ something ] must be in double quotes.", "raw": " something=''", "evidence": "
", @@ -224,7 +224,7 @@ } }, { - "type": "error", + "type": "warning", "message": "Tag must be paired, no start tag: [ ]", "raw": "", "evidence": " ", @@ -237,7 +237,7 @@ } }, { - "type": "error", + "type": "warning", "message": "Tag must be paired, no start tag: [ ]", "raw": "", "evidence": "", @@ -250,7 +250,7 @@ } }, { - "type": "error", + "type": "warning", "message": "Tag must be paired, no start tag: [ ]", "raw": "", "evidence": "", @@ -263,6 +263,6 @@ } } ], - "time": 2 + "time": 17 } ] diff --git a/test/cli/formatters/json.spec.js b/test/cli/formatters/json.spec.js index 7f73e35c2..85d21a3ec 100644 --- a/test/cli/formatters/json.spec.js +++ b/test/cli/formatters/json.spec.js @@ -6,7 +6,7 @@ const path = require('path') describe('CLI', () => { describe('Formatter: json', () => { - it('should have stdout output with formatter json', (done) => { + it('Should have stdout output with formatter json', (done) => { const expectedFileContent = fs .readFileSync(path.resolve(__dirname, 'json.json'), 'utf8') .replace( diff --git a/test/cli/formatters/junit.spec.js b/test/cli/formatters/junit.spec.js index 1954fe49d..2d60a6710 100644 --- a/test/cli/formatters/junit.spec.js +++ b/test/cli/formatters/junit.spec.js @@ -6,7 +6,7 @@ const path = require('path') describe('CLI', () => { describe('Formatter: junit', () => { - it('should have stdout output with formatter junit', (done) => { + it('Should have stdout output with formatter junit', (done) => { ChildProcess.exec( [ 'node', diff --git a/test/cli/formatters/markdown.spec.js b/test/cli/formatters/markdown.spec.js index ed9d7fe02..61d759d34 100644 --- a/test/cli/formatters/markdown.spec.js +++ b/test/cli/formatters/markdown.spec.js @@ -5,7 +5,7 @@ const path = require('path') describe('CLI', () => { describe('Formatter: markdown', () => { - it('should have stdout output with formatter markdown', (done) => { + it('Should have stdout output with formatter markdown', (done) => { ChildProcess.exec( [ 'node', @@ -19,7 +19,7 @@ describe('CLI', () => { expect(error.code).to.be.equal(1) expect(stdout).to.contain('# TOC') - expect(stdout).to.contain('Found 20 errors, 0 warnings') + expect(stdout).to.contain('Found 2 errors, 18 warnings') expect(stdout).to.contain('example.html') expect(stdout).to.contain( '^ Tag must be paired, no start tag: [ ] (tag-pair)' diff --git a/test/cli/formatters/unix.spec.js b/test/cli/formatters/unix.spec.js index bee9348b6..aded1403a 100644 --- a/test/cli/formatters/unix.spec.js +++ b/test/cli/formatters/unix.spec.js @@ -6,7 +6,7 @@ const path = require('path') describe('CLI', () => { describe('Formatter: unix', () => { - it('should have stdout output with formatter unix', (done) => { + it('Should have stdout output with formatter unix', (done) => { const expected = fs .readFileSync(path.resolve(__dirname, 'unix.txt'), 'utf8') .replace( diff --git a/test/cli/formatters/unix.txt b/test/cli/formatters/unix.txt index decd9aef9..5e2ad2d4a 100644 --- a/test/cli/formatters/unix.txt +++ b/test/cli/formatters/unix.txt @@ -1,94 +1,94 @@ -{{path}}:8:7: The value of attribute [ bad ] must be in double quotes. [error/attr-value-double-quotes] -{{path}}:8:14: The value of attribute [ bad ] must be in double quotes. [error/attr-value-double-quotes] {{path}}:8:14: Duplicate of attribute name [ bad ] was found. [error/attr-no-duplication] -{{path}}:9:7: The value of attribute [ bad ] must be in double quotes. [error/attr-value-double-quotes] -{{path}}:9:14: The value of attribute [ bad ] must be in double quotes. [error/attr-value-double-quotes] +{{path}}:8:7: The value of attribute [ bad ] must be in double quotes. [warning/attr-value-double-quotes] +{{path}}:8:14: The value of attribute [ bad ] must be in double quotes. [warning/attr-value-double-quotes] {{path}}:9:14: Duplicate of attribute name [ bad ] was found. [error/attr-no-duplication] -{{path}}:10:7: The value of attribute [ bad ] must be in double quotes. [error/attr-value-double-quotes] -{{path}}:10:14: The value of attribute [ bad ] must be in double quotes. [error/attr-value-double-quotes] +{{path}}:9:7: The value of attribute [ bad ] must be in double quotes. [warning/attr-value-double-quotes] +{{path}}:9:14: The value of attribute [ bad ] must be in double quotes. [warning/attr-value-double-quotes] {{path}}:10:14: Duplicate of attribute name [ bad ] was found. [error/attr-no-duplication] -{{path}}:11:7: The value of attribute [ bad ] must be in double quotes. [error/attr-value-double-quotes] -{{path}}:11:14: The value of attribute [ bad ] must be in double quotes. [error/attr-value-double-quotes] +{{path}}:10:7: The value of attribute [ bad ] must be in double quotes. [warning/attr-value-double-quotes] +{{path}}:10:14: The value of attribute [ bad ] must be in double quotes. [warning/attr-value-double-quotes] {{path}}:11:14: Duplicate of attribute name [ bad ] was found. [error/attr-no-duplication] -{{path}}:12:7: The value of attribute [ bad ] must be in double quotes. [error/attr-value-double-quotes] -{{path}}:12:14: The value of attribute [ bad ] must be in double quotes. [error/attr-value-double-quotes] +{{path}}:11:7: The value of attribute [ bad ] must be in double quotes. [warning/attr-value-double-quotes] +{{path}}:11:14: The value of attribute [ bad ] must be in double quotes. [warning/attr-value-double-quotes] {{path}}:12:14: Duplicate of attribute name [ bad ] was found. [error/attr-no-duplication] -{{path}}:13:7: The value of attribute [ bad ] must be in double quotes. [error/attr-value-double-quotes] -{{path}}:13:14: The value of attribute [ bad ] must be in double quotes. [error/attr-value-double-quotes] +{{path}}:12:7: The value of attribute [ bad ] must be in double quotes. [warning/attr-value-double-quotes] +{{path}}:12:14: The value of attribute [ bad ] must be in double quotes. [warning/attr-value-double-quotes] {{path}}:13:14: Duplicate of attribute name [ bad ] was found. [error/attr-no-duplication] -{{path}}:14:7: The value of attribute [ bad ] must be in double quotes. [error/attr-value-double-quotes] -{{path}}:14:14: The value of attribute [ bad ] must be in double quotes. [error/attr-value-double-quotes] +{{path}}:13:7: The value of attribute [ bad ] must be in double quotes. [warning/attr-value-double-quotes] +{{path}}:13:14: The value of attribute [ bad ] must be in double quotes. [warning/attr-value-double-quotes] {{path}}:14:14: Duplicate of attribute name [ bad ] was found. [error/attr-no-duplication] -{{path}}:15:7: The value of attribute [ bad ] must be in double quotes. [error/attr-value-double-quotes] -{{path}}:15:14: The value of attribute [ bad ] must be in double quotes. [error/attr-value-double-quotes] +{{path}}:14:7: The value of attribute [ bad ] must be in double quotes. [warning/attr-value-double-quotes] +{{path}}:14:14: The value of attribute [ bad ] must be in double quotes. [warning/attr-value-double-quotes] {{path}}:15:14: Duplicate of attribute name [ bad ] was found. [error/attr-no-duplication] -{{path}}:16:7: The value of attribute [ bad ] must be in double quotes. [error/attr-value-double-quotes] -{{path}}:16:14: The value of attribute [ bad ] must be in double quotes. [error/attr-value-double-quotes] +{{path}}:15:7: The value of attribute [ bad ] must be in double quotes. [warning/attr-value-double-quotes] +{{path}}:15:14: The value of attribute [ bad ] must be in double quotes. [warning/attr-value-double-quotes] {{path}}:16:14: Duplicate of attribute name [ bad ] was found. [error/attr-no-duplication] -{{path}}:17:7: The value of attribute [ bad ] must be in double quotes. [error/attr-value-double-quotes] -{{path}}:17:14: The value of attribute [ bad ] must be in double quotes. [error/attr-value-double-quotes] +{{path}}:16:7: The value of attribute [ bad ] must be in double quotes. [warning/attr-value-double-quotes] +{{path}}:16:14: The value of attribute [ bad ] must be in double quotes. [warning/attr-value-double-quotes] {{path}}:17:14: Duplicate of attribute name [ bad ] was found. [error/attr-no-duplication] -{{path}}:18:7: The value of attribute [ bad ] must be in double quotes. [error/attr-value-double-quotes] -{{path}}:18:14: The value of attribute [ bad ] must be in double quotes. [error/attr-value-double-quotes] +{{path}}:17:7: The value of attribute [ bad ] must be in double quotes. [warning/attr-value-double-quotes] +{{path}}:17:14: The value of attribute [ bad ] must be in double quotes. [warning/attr-value-double-quotes] {{path}}:18:14: Duplicate of attribute name [ bad ] was found. [error/attr-no-duplication] -{{path}}:19:7: The value of attribute [ bad ] must be in double quotes. [error/attr-value-double-quotes] -{{path}}:19:14: The value of attribute [ bad ] must be in double quotes. [error/attr-value-double-quotes] +{{path}}:18:7: The value of attribute [ bad ] must be in double quotes. [warning/attr-value-double-quotes] +{{path}}:18:14: The value of attribute [ bad ] must be in double quotes. [warning/attr-value-double-quotes] {{path}}:19:14: Duplicate of attribute name [ bad ] was found. [error/attr-no-duplication] -{{path}}:20:7: The value of attribute [ bad ] must be in double quotes. [error/attr-value-double-quotes] -{{path}}:20:14: The value of attribute [ bad ] must be in double quotes. [error/attr-value-double-quotes] +{{path}}:19:7: The value of attribute [ bad ] must be in double quotes. [warning/attr-value-double-quotes] +{{path}}:19:14: The value of attribute [ bad ] must be in double quotes. [warning/attr-value-double-quotes] {{path}}:20:14: Duplicate of attribute name [ bad ] was found. [error/attr-no-duplication] -{{path}}:21:7: The value of attribute [ bad ] must be in double quotes. [error/attr-value-double-quotes] -{{path}}:21:14: The value of attribute [ bad ] must be in double quotes. [error/attr-value-double-quotes] +{{path}}:20:7: The value of attribute [ bad ] must be in double quotes. [warning/attr-value-double-quotes] +{{path}}:20:14: The value of attribute [ bad ] must be in double quotes. [warning/attr-value-double-quotes] {{path}}:21:14: Duplicate of attribute name [ bad ] was found. [error/attr-no-duplication] -{{path}}:22:7: The value of attribute [ bad ] must be in double quotes. [error/attr-value-double-quotes] -{{path}}:22:14: The value of attribute [ bad ] must be in double quotes. [error/attr-value-double-quotes] +{{path}}:21:7: The value of attribute [ bad ] must be in double quotes. [warning/attr-value-double-quotes] +{{path}}:21:14: The value of attribute [ bad ] must be in double quotes. [warning/attr-value-double-quotes] {{path}}:22:14: Duplicate of attribute name [ bad ] was found. [error/attr-no-duplication] -{{path}}:23:7: The value of attribute [ bad ] must be in double quotes. [error/attr-value-double-quotes] -{{path}}:23:14: The value of attribute [ bad ] must be in double quotes. [error/attr-value-double-quotes] +{{path}}:22:7: The value of attribute [ bad ] must be in double quotes. [warning/attr-value-double-quotes] +{{path}}:22:14: The value of attribute [ bad ] must be in double quotes. [warning/attr-value-double-quotes] {{path}}:23:14: Duplicate of attribute name [ bad ] was found. [error/attr-no-duplication] -{{path}}:24:7: The value of attribute [ bad ] must be in double quotes. [error/attr-value-double-quotes] -{{path}}:24:14: The value of attribute [ bad ] must be in double quotes. [error/attr-value-double-quotes] +{{path}}:23:7: The value of attribute [ bad ] must be in double quotes. [warning/attr-value-double-quotes] +{{path}}:23:14: The value of attribute [ bad ] must be in double quotes. [warning/attr-value-double-quotes] {{path}}:24:14: Duplicate of attribute name [ bad ] was found. [error/attr-no-duplication] -{{path}}:25:22: Tag must be paired, no start tag: [ ] [error/tag-pair] -{{path}}:26:3: Special characters must be escaped : [ < ]. [error/spec-char-escape] -{{path}}:26:18: Special characters must be escaped : [ > ]. [error/spec-char-escape] -{{path}}:28:11: Tag must be paired, no start tag: [ ] [error/tag-pair] -{{path}}:29:9: Tag must be paired, no start tag: [ ] [error/tag-pair] -{{path}}:30:7: Tag must be paired, no start tag: [ ] [error/tag-pair] -{{path}}:31:5: Tag must be paired, no start tag: [ ] [error/tag-pair] -{{path}}:32:3: Tag must be paired, no start tag: [ ] [error/tag-pair] -{{path}}:38:19: The value of attribute [ class ] must be in double quotes. [error/attr-value-double-quotes] -{{path}}:38:28: The value of attribute [ what ] must be in double quotes. [error/attr-value-double-quotes] -{{path}}:38:36: The value of attribute [ something ] must be in double quotes. [error/attr-value-double-quotes] -{{path}}:44:3: Tag must be paired, no start tag: [ ] [error/tag-pair] -{{path}}:50:19: The value of attribute [ class ] must be in double quotes. [error/attr-value-double-quotes] -{{path}}:50:28: The value of attribute [ what ] must be in double quotes. [error/attr-value-double-quotes] -{{path}}:50:36: The value of attribute [ something ] must be in double quotes. [error/attr-value-double-quotes] -{{path}}:56:3: Tag must be paired, no start tag: [ ] [error/tag-pair] -{{path}}:62:19: The value of attribute [ class ] must be in double quotes. [error/attr-value-double-quotes] -{{path}}:62:28: The value of attribute [ what ] must be in double quotes. [error/attr-value-double-quotes] -{{path}}:62:36: The value of attribute [ something ] must be in double quotes. [error/attr-value-double-quotes] -{{path}}:68:3: Tag must be paired, no start tag: [ ] [error/tag-pair] -{{path}}:74:19: The value of attribute [ class ] must be in double quotes. [error/attr-value-double-quotes] -{{path}}:74:28: The value of attribute [ what ] must be in double quotes. [error/attr-value-double-quotes] -{{path}}:74:36: The value of attribute [ something ] must be in double quotes. [error/attr-value-double-quotes] -{{path}}:80:3: Tag must be paired, no start tag: [ ] [error/tag-pair] -{{path}}:81:1: Tag must be paired, no start tag: [ ] [error/tag-pair] -{{path}}:82:1: Tag must be paired, no start tag: [ ] [error/tag-pair] -{{path}}:83:1: Tag must be paired, no start tag: [ ] [error/tag-pair] -{{path}}:84:1: Tag must be paired, no start tag: [ ] [error/tag-pair] -{{path}}:85:1: Tag must be paired, no start tag: [ ] [error/tag-pair] -{{path}}:86:1: Tag must be paired, no start tag: [ ] [error/tag-pair] -{{path}}:87:1: Tag must be paired, no start tag: [ ] [error/tag-pair] -{{path}}:88:1: Tag must be paired, no start tag: [ ] [error/tag-pair] -{{path}}:89:1: Tag must be paired, no start tag: [ ] [error/tag-pair] -{{path}}:90:1: Tag must be paired, no start tag: [ ] [error/tag-pair] -{{path}}:91:1: Tag must be paired, no start tag: [ ] [error/tag-pair] -{{path}}:92:1: Tag must be paired, no start tag: [ ] [error/tag-pair] -{{path}}:93:1: Tag must be paired, no start tag: [ ] [error/tag-pair] -{{path}}:94:1: Tag must be paired, no start tag: [ ] [error/tag-pair] -{{path}}:95:1: Tag must be paired, no start tag: [ ] [error/tag-pair] -{{path}}:96:1: Tag must be paired, no start tag: [ ] [error/tag-pair] -{{path}}:97:1: Tag must be paired, no start tag: [ ] [error/tag-pair] +{{path}}:24:7: The value of attribute [ bad ] must be in double quotes. [warning/attr-value-double-quotes] +{{path}}:24:14: The value of attribute [ bad ] must be in double quotes. [warning/attr-value-double-quotes] +{{path}}:25:22: Tag must be paired, no start tag: [ ] [warning/tag-pair] +{{path}}:26:3: Special characters must be escaped : [ < ]. [warning/spec-char-escape] +{{path}}:26:18: Special characters must be escaped : [ > ]. [warning/spec-char-escape] +{{path}}:28:11: Tag must be paired, no start tag: [ ] [warning/tag-pair] +{{path}}:29:9: Tag must be paired, no start tag: [ ] [warning/tag-pair] +{{path}}:30:7: Tag must be paired, no start tag: [ ] [warning/tag-pair] +{{path}}:31:5: Tag must be paired, no start tag: [ ] [warning/tag-pair] +{{path}}:32:3: Tag must be paired, no start tag: [ ] [warning/tag-pair] +{{path}}:38:19: The value of attribute [ class ] must be in double quotes. [warning/attr-value-double-quotes] +{{path}}:38:28: The value of attribute [ what ] must be in double quotes. [warning/attr-value-double-quotes] +{{path}}:38:36: The value of attribute [ something ] must be in double quotes. [warning/attr-value-double-quotes] +{{path}}:44:3: Tag must be paired, no start tag: [ ] [warning/tag-pair] +{{path}}:50:19: The value of attribute [ class ] must be in double quotes. [warning/attr-value-double-quotes] +{{path}}:50:28: The value of attribute [ what ] must be in double quotes. [warning/attr-value-double-quotes] +{{path}}:50:36: The value of attribute [ something ] must be in double quotes. [warning/attr-value-double-quotes] +{{path}}:56:3: Tag must be paired, no start tag: [ ] [warning/tag-pair] +{{path}}:62:19: The value of attribute [ class ] must be in double quotes. [warning/attr-value-double-quotes] +{{path}}:62:28: The value of attribute [ what ] must be in double quotes. [warning/attr-value-double-quotes] +{{path}}:62:36: The value of attribute [ something ] must be in double quotes. [warning/attr-value-double-quotes] +{{path}}:68:3: Tag must be paired, no start tag: [ ] [warning/tag-pair] +{{path}}:74:19: The value of attribute [ class ] must be in double quotes. [warning/attr-value-double-quotes] +{{path}}:74:28: The value of attribute [ what ] must be in double quotes. [warning/attr-value-double-quotes] +{{path}}:74:36: The value of attribute [ something ] must be in double quotes. [warning/attr-value-double-quotes] +{{path}}:80:3: Tag must be paired, no start tag: [ ] [warning/tag-pair] +{{path}}:81:1: Tag must be paired, no start tag: [ ] [warning/tag-pair] +{{path}}:82:1: Tag must be paired, no start tag: [ ] [warning/tag-pair] +{{path}}:83:1: Tag must be paired, no start tag: [ ] [warning/tag-pair] +{{path}}:84:1: Tag must be paired, no start tag: [ ] [warning/tag-pair] +{{path}}:85:1: Tag must be paired, no start tag: [ ] [warning/tag-pair] +{{path}}:86:1: Tag must be paired, no start tag: [ ] [warning/tag-pair] +{{path}}:87:1: Tag must be paired, no start tag: [ ] [warning/tag-pair] +{{path}}:88:1: Tag must be paired, no start tag: [ ] [warning/tag-pair] +{{path}}:89:1: Tag must be paired, no start tag: [ ] [warning/tag-pair] +{{path}}:90:1: Tag must be paired, no start tag: [ ] [warning/tag-pair] +{{path}}:91:1: Tag must be paired, no start tag: [ ] [warning/tag-pair] +{{path}}:92:1: Tag must be paired, no start tag: [ ] [warning/tag-pair] +{{path}}:93:1: Tag must be paired, no start tag: [ ] [warning/tag-pair] +{{path}}:94:1: Tag must be paired, no start tag: [ ] [warning/tag-pair] +{{path}}:95:1: Tag must be paired, no start tag: [ ] [warning/tag-pair] +{{path}}:96:1: Tag must be paired, no start tag: [ ] [warning/tag-pair] +{{path}}:97:1: Tag must be paired, no start tag: [ ] [warning/tag-pair] \u001b[31m92 problems\u001b[39m diff --git a/test/htmlparser.spec.js b/test/htmlparser.spec.js index 1b5f8e743..2dcadfde1 100644 --- a/test/htmlparser.spec.js +++ b/test/htmlparser.spec.js @@ -1,5 +1,6 @@ const expect = require('expect.js') +/** @type import('../src/core/core').HTMLParser */ const HTMLParser = require('../dist/htmlhint.js').HTMLParser expect.Assertion.prototype.event = function (type, attr) { diff --git a/test/rules/alt-require.spec.js b/test/rules/alt-require.spec.js index f79347e5b..067b90d46 100644 --- a/test/rules/alt-require.spec.js +++ b/test/rules/alt-require.spec.js @@ -1,5 +1,6 @@ const expect = require('expect.js') +/** @type import('../../src/core/core').HTMLHint */ const HTMLHint = require('../../dist/htmlhint.js').HTMLHint const ruldId = 'alt-require' diff --git a/test/rules/attr-lowercase.spec.js b/test/rules/attr-lowercase.spec.js index 3164cdfb7..0654f8325 100644 --- a/test/rules/attr-lowercase.spec.js +++ b/test/rules/attr-lowercase.spec.js @@ -1,5 +1,6 @@ const expect = require('expect.js') +/** @type import('../../src/core/core').HTMLHint */ const HTMLHint = require('../../dist/htmlhint.js').HTMLHint const ruldId = 'attr-lowercase' diff --git a/test/rules/attr-no-duplication.spec.js b/test/rules/attr-no-duplication.spec.js index e1fba4edb..974c3fbdf 100644 --- a/test/rules/attr-no-duplication.spec.js +++ b/test/rules/attr-no-duplication.spec.js @@ -1,5 +1,6 @@ const expect = require('expect.js') +/** @type import('../../src/core/core').HTMLHint */ const HTMLHint = require('../../dist/htmlhint.js').HTMLHint const ruldId = 'attr-no-duplication' diff --git a/test/rules/attr-no-unnecessary-whitespace.spec.js b/test/rules/attr-no-unnecessary-whitespace.spec.js index 0a8e1d79e..ddd9726d4 100644 --- a/test/rules/attr-no-unnecessary-whitespace.spec.js +++ b/test/rules/attr-no-unnecessary-whitespace.spec.js @@ -1,5 +1,6 @@ const expect = require('expect.js') +/** @type import('../../src/core/core').HTMLHint */ const HTMLHint = require('../../dist/htmlhint.js').HTMLHint const ruldId = 'attr-no-unnecessary-whitespace' diff --git a/test/rules/attr-sort.spec.js b/test/rules/attr-sort.spec.js index a12f2269a..06b4dd919 100644 --- a/test/rules/attr-sort.spec.js +++ b/test/rules/attr-sort.spec.js @@ -1,5 +1,6 @@ const expect = require('expect.js') +/** @type import('../../src/core/core').HTMLHint */ const HTMLHint = require('../../dist/htmlhint.js').HTMLHint const ruleId = 'attr-sorted' diff --git a/test/rules/attr-unsafe-chars.spec.js b/test/rules/attr-unsafe-chars.spec.js index 1ca55ef0b..db539c528 100644 --- a/test/rules/attr-unsafe-chars.spec.js +++ b/test/rules/attr-unsafe-chars.spec.js @@ -1,5 +1,6 @@ const expect = require('expect.js') +/** @type import('../../src/core/core').HTMLHint */ const HTMLHint = require('../../dist/htmlhint.js').HTMLHint const ruldId = 'attr-unsafe-chars' diff --git a/test/rules/attr-value-double-quotes.spec.js b/test/rules/attr-value-double-quotes.spec.js index 06ea4a030..3d778e4a5 100644 --- a/test/rules/attr-value-double-quotes.spec.js +++ b/test/rules/attr-value-double-quotes.spec.js @@ -1,5 +1,6 @@ const expect = require('expect.js') +/** @type import('../../src/core/core').HTMLHint */ const HTMLHint = require('../../dist/htmlhint.js').HTMLHint const ruldId = 'attr-value-double-quotes' diff --git a/test/rules/attr-value-not-empty.spec.js b/test/rules/attr-value-not-empty.spec.js index ced884191..66ef4b10b 100644 --- a/test/rules/attr-value-not-empty.spec.js +++ b/test/rules/attr-value-not-empty.spec.js @@ -1,5 +1,6 @@ const expect = require('expect.js') +/** @type import('../../src/core/core').HTMLHint */ const HTMLHint = require('../../dist/htmlhint.js').HTMLHint const ruldId = 'attr-value-not-empty' diff --git a/test/rules/attr-value-single-quotes.spec.js b/test/rules/attr-value-single-quotes.spec.js index 2660c9b70..8440be096 100644 --- a/test/rules/attr-value-single-quotes.spec.js +++ b/test/rules/attr-value-single-quotes.spec.js @@ -1,5 +1,6 @@ const expect = require('expect.js') +/** @type import('../../src/core/core').HTMLHint */ const HTMLHint = require('../../dist/htmlhint.js').HTMLHint const ruldId = 'attr-value-single-quotes' diff --git a/test/rules/attr-whitespace.spec.js b/test/rules/attr-whitespace.spec.js index 5f0ba5f62..d27e91ff6 100644 --- a/test/rules/attr-whitespace.spec.js +++ b/test/rules/attr-whitespace.spec.js @@ -1,5 +1,6 @@ const expect = require('expect.js') +/** @type import('../../src/core/core').HTMLHint */ const HTMLHint = require('../../dist/htmlhint.js').HTMLHint const ruldId = 'attr-whitespace' diff --git a/test/rules/default.spec.js b/test/rules/default.spec.js index a8b6f213b..e729b27d1 100644 --- a/test/rules/default.spec.js +++ b/test/rules/default.spec.js @@ -1,11 +1,12 @@ const expect = require('expect.js') +/** @type import('../../src/core/core').HTMLHint */ const HTMLHint = require('../../dist/htmlhint.js').HTMLHint describe('Rules: default', () => { - it('should result 3 errors', () => { + it('should result 2 errors', () => { const code = '

' const messages = HTMLHint.verify(code) - expect(messages.length).to.be(3) + expect(messages.length).to.be(2) }) }) diff --git a/test/rules/doctype-first.spec.js b/test/rules/doctype-first.spec.js index 630541c1f..b1831bde6 100644 --- a/test/rules/doctype-first.spec.js +++ b/test/rules/doctype-first.spec.js @@ -1,5 +1,6 @@ const expect = require('expect.js') +/** @type import('../../src/core/core').HTMLHint */ const HTMLHint = require('../../dist/htmlhint.js').HTMLHint const ruldId = 'doctype-first' diff --git a/test/rules/doctype-html5.spec.js b/test/rules/doctype-html5.spec.js index b796ddb28..d11570ef7 100644 --- a/test/rules/doctype-html5.spec.js +++ b/test/rules/doctype-html5.spec.js @@ -1,5 +1,6 @@ const expect = require('expect.js') +/** @type import('../../src/core/core').HTMLHint */ const HTMLHint = require('../../dist/htmlhint.js').HTMLHint const ruldId = 'doctype-html5' diff --git a/test/rules/head-require.spec.js b/test/rules/head-require.spec.js index 576efc041..6505f3976 100644 --- a/test/rules/head-require.spec.js +++ b/test/rules/head-require.spec.js @@ -1,5 +1,6 @@ const expect = require('expect.js') +/** @type import('../../src/core/core').HTMLHint */ const HTMLHint = require('../../dist/htmlhint.js').HTMLHint const ruldId = 'head-script-disabled' diff --git a/test/rules/head-script-disabled.spec.js b/test/rules/head-script-disabled.spec.js index 576efc041..6505f3976 100644 --- a/test/rules/head-script-disabled.spec.js +++ b/test/rules/head-script-disabled.spec.js @@ -1,5 +1,6 @@ const expect = require('expect.js') +/** @type import('../../src/core/core').HTMLHint */ const HTMLHint = require('../../dist/htmlhint.js').HTMLHint const ruldId = 'head-script-disabled' diff --git a/test/rules/href-abs-or-rel.spec.js b/test/rules/href-abs-or-rel.spec.js index 3a7420c2b..77fe35864 100644 --- a/test/rules/href-abs-or-rel.spec.js +++ b/test/rules/href-abs-or-rel.spec.js @@ -1,5 +1,6 @@ const expect = require('expect.js') +/** @type import('../../src/core/core').HTMLHint */ const HTMLHint = require('../../dist/htmlhint.js').HTMLHint const ruldId = 'href-abs-or-rel' diff --git a/test/rules/id-class-ad-disabled.spec.js b/test/rules/id-class-ad-disabled.spec.js index 599e2f37a..c5ea2f29a 100644 --- a/test/rules/id-class-ad-disabled.spec.js +++ b/test/rules/id-class-ad-disabled.spec.js @@ -1,5 +1,6 @@ const expect = require('expect.js') +/** @type import('../../src/core/core').HTMLHint */ const HTMLHint = require('../../dist/htmlhint.js').HTMLHint const ruldId = 'id-class-ad-disabled' diff --git a/test/rules/id-class-value.spec.js b/test/rules/id-class-value.spec.js index a28cce0f1..c6978bf50 100644 --- a/test/rules/id-class-value.spec.js +++ b/test/rules/id-class-value.spec.js @@ -1,5 +1,6 @@ const expect = require('expect.js') +/** @type import('../../src/core/core').HTMLHint */ const HTMLHint = require('../../dist/htmlhint.js').HTMLHint const ruldId = 'id-class-value' diff --git a/test/rules/id-unique.spec.js b/test/rules/id-unique.spec.js index 75fc84868..c85abc94e 100644 --- a/test/rules/id-unique.spec.js +++ b/test/rules/id-unique.spec.js @@ -1,5 +1,6 @@ const expect = require('expect.js') +/** @type import('../../src/core/core').HTMLHint */ const HTMLHint = require('../../dist/htmlhint.js').HTMLHint const ruldId = 'id-unique' diff --git a/test/rules/inline-script-disabled.spec.js b/test/rules/inline-script-disabled.spec.js index 869eb53c1..7a66c988d 100644 --- a/test/rules/inline-script-disabled.spec.js +++ b/test/rules/inline-script-disabled.spec.js @@ -1,5 +1,6 @@ const expect = require('expect.js') +/** @type import('../../src/core/core').HTMLHint */ const HTMLHint = require('../../dist/htmlhint.js').HTMLHint const ruldId = 'inline-script-disabled' diff --git a/test/rules/inline-style-disabled.spec.js b/test/rules/inline-style-disabled.spec.js index fec36f2d2..a0cb5f972 100644 --- a/test/rules/inline-style-disabled.spec.js +++ b/test/rules/inline-style-disabled.spec.js @@ -1,5 +1,6 @@ const expect = require('expect.js') +/** @type import('../../src/core/core').HTMLHint */ const HTMLHint = require('../../dist/htmlhint.js').HTMLHint const ruldId = 'inline-style-disabled' diff --git a/test/rules/input-requires-label.spec.js b/test/rules/input-requires-label.spec.js index 8d2637e92..d747ad9a5 100644 --- a/test/rules/input-requires-label.spec.js +++ b/test/rules/input-requires-label.spec.js @@ -1,5 +1,6 @@ const expect = require('expect.js') +/** @type import('../../src/core/core').HTMLHint */ const HTMLHint = require('../../dist/htmlhint.js').HTMLHint const ruleId = 'input-requires-label' diff --git a/test/rules/script-disabled.spec.js b/test/rules/script-disabled.spec.js index 5a0ae5b07..a803c5951 100755 --- a/test/rules/script-disabled.spec.js +++ b/test/rules/script-disabled.spec.js @@ -1,5 +1,6 @@ const expect = require('expect.js') +/** @type import('../../src/core/core').HTMLHint */ const HTMLHint = require('../../dist/htmlhint.js').HTMLHint const ruldId = 'script-disabled' diff --git a/test/rules/space-tab-mixed-disabled.spec.js b/test/rules/space-tab-mixed-disabled.spec.js index 6542c414d..ab3621246 100644 --- a/test/rules/space-tab-mixed-disabled.spec.js +++ b/test/rules/space-tab-mixed-disabled.spec.js @@ -1,5 +1,6 @@ const expect = require('expect.js') +/** @type import('../../src/core/core').HTMLHint */ const HTMLHint = require('../../dist/htmlhint.js').HTMLHint const ruldId = 'space-tab-mixed-disabled' diff --git a/test/rules/spec-char-escape.spec.js b/test/rules/spec-char-escape.spec.js index b22bf84cd..fddc62df2 100644 --- a/test/rules/spec-char-escape.spec.js +++ b/test/rules/spec-char-escape.spec.js @@ -1,5 +1,6 @@ const expect = require('expect.js') +/** @type import('../../src/core/core').HTMLHint */ const HTMLHint = require('../../dist/htmlhint.js').HTMLHint const ruldId = 'spec-char-escape' diff --git a/test/rules/src-not-empty.spec.js b/test/rules/src-not-empty.spec.js index 895d0b352..ddbf9b655 100644 --- a/test/rules/src-not-empty.spec.js +++ b/test/rules/src-not-empty.spec.js @@ -1,5 +1,6 @@ const expect = require('expect.js') +/** @type import('../../src/core/core').HTMLHint */ const HTMLHint = require('../../dist/htmlhint.js').HTMLHint const ruldId = 'src-not-empty' diff --git a/test/rules/style-disabled.spec.js b/test/rules/style-disabled.spec.js index dcbc001d2..4c5ef6d55 100644 --- a/test/rules/style-disabled.spec.js +++ b/test/rules/style-disabled.spec.js @@ -1,5 +1,6 @@ const expect = require('expect.js') +/** @type import('../../src/core/core').HTMLHint */ const HTMLHint = require('../../dist/htmlhint.js').HTMLHint const ruldId = 'style-disabled' diff --git a/test/rules/tag-pair.spec.js b/test/rules/tag-pair.spec.js index 84dcd916b..72a99fc0e 100644 --- a/test/rules/tag-pair.spec.js +++ b/test/rules/tag-pair.spec.js @@ -1,5 +1,6 @@ const expect = require('expect.js') +/** @type import('../../src/core/core').HTMLHint */ const HTMLHint = require('../../dist/htmlhint.js').HTMLHint const ruldId = 'tag-pair' diff --git a/test/rules/tag-self-close.spec.js b/test/rules/tag-self-close.spec.js index a66699246..945226a96 100644 --- a/test/rules/tag-self-close.spec.js +++ b/test/rules/tag-self-close.spec.js @@ -1,5 +1,6 @@ const expect = require('expect.js') +/** @type import('../../src/core/core').HTMLHint */ const HTMLHint = require('../../dist/htmlhint.js').HTMLHint const ruldId = 'tag-self-close' diff --git a/test/rules/tagname-lowercase.spec.js b/test/rules/tagname-lowercase.spec.js index 0f6116f94..d1fed87fa 100644 --- a/test/rules/tagname-lowercase.spec.js +++ b/test/rules/tagname-lowercase.spec.js @@ -1,5 +1,6 @@ const expect = require('expect.js') +/** @type import('../../src/core/core').HTMLHint */ const HTMLHint = require('../../dist/htmlhint.js').HTMLHint const ruldId = 'tagname-lowercase' diff --git a/test/rules/tagname-specialchars.spec.js b/test/rules/tagname-specialchars.spec.js index 583f6a3ba..a9c8b1246 100644 --- a/test/rules/tagname-specialchars.spec.js +++ b/test/rules/tagname-specialchars.spec.js @@ -1,5 +1,6 @@ const expect = require('expect.js') +/** @type import('../../src/core/core').HTMLHint */ const HTMLHint = require('../../dist/htmlhint.js').HTMLHint const ruldId = 'tagname-specialchars' diff --git a/test/rules/tags-check.spec.js b/test/rules/tags-check.spec.js index cb20f71c0..5b66f4bb0 100644 --- a/test/rules/tags-check.spec.js +++ b/test/rules/tags-check.spec.js @@ -1,5 +1,6 @@ const expect = require('expect.js') +/** @type import('../../src/core/core').HTMLHint */ const HTMLHint = require('../../dist/htmlhint.js').HTMLHint const ruldId = 'tags-check' diff --git a/test/rules/title-require.spec.js b/test/rules/title-require.spec.js index 0ee456249..958f6a01d 100644 --- a/test/rules/title-require.spec.js +++ b/test/rules/title-require.spec.js @@ -1,5 +1,6 @@ const expect = require('expect.js') +/** @type import('../../src/core/core').HTMLHint */ const HTMLHint = require('../../dist/htmlhint.js').HTMLHint const ruldId = 'title-require'