Skip to content
This repository was archived by the owner on Aug 7, 2023. It is now read-only.

Commit 7fc16a9

Browse files
committed
fix(deps): instantiate HTMLHint
It seems like in the v0.11 release they completely broke the old method of getting a working HTMLHint instance. This code seems to give us something that passes the specs at least.
1 parent f09031c commit 7fc16a9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,11 @@ const loadDeps = () => {
5656
({ dirname } = require('path'));
5757
}
5858
if (!HTMLHint) {
59-
({ HTMLHint } = require('htmlhint'));
59+
const htmlhintModule = require('htmlhint');
60+
HTMLHint = new htmlhintModule.HTMLHint();
61+
Object.keys(htmlhintModule.HTMLRules).forEach((rule) => {
62+
HTMLHint.addRule(htmlhintModule.HTMLRules[rule]);
63+
});
6064
}
6165
if (!findAsync || !generateRange) {
6266
({ findAsync, generateRange } = require('atom-linter'));

0 commit comments

Comments
 (0)