Skip to content

Commit bb6631f

Browse files
committed
feat: Add Config file path option
1 parent 546fec5 commit bb6631f

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

htmlhint-server/src/server.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ interface Settings {
1414
configFile: string;
1515
enable: boolean;
1616
options: any;
17+
optionsFile: string;
1718
};
1819
[key: string]: any;
1920
}
@@ -109,6 +110,8 @@ function getConfiguration(filePath: string): any {
109110
Object.keys(settings.htmlhint.options).length > 0
110111
) {
111112
options = settings.htmlhint.options;
113+
} else if (settings.htmlhint && settings.htmlhint.optionsFile) {
114+
options = loadConfigurationFile(settings.htmlhint.optionsFile);
112115
} else {
113116
options = findConfigForHtmlFile(filePath);
114117
}

htmlhint/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

htmlhint/package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"displayName": "HTMLHint",
44
"description": "VS Code integration for HTMLHint - A Static Code Analysis Tool for HTML",
55
"icon": "images/icon.png",
6-
"version": "1.4.1",
6+
"version": "1.4.2",
77
"publisher": "HTMLHint",
88
"galleryBanner": {
99
"color": "#333333",
@@ -54,6 +54,11 @@
5454
"type": "object",
5555
"default": {},
5656
"description": "The HTMLHint options object to provide args to the HTMLHint command."
57+
},
58+
"htmlhint.optionsFile": {
59+
"type": "string",
60+
"default": null,
61+
"description": "The HTMLHint options config file path."
5762
}
5863
}
5964
},

0 commit comments

Comments
 (0)