diff --git a/htmlhint-server/src/server.ts b/htmlhint-server/src/server.ts index 6ed2131..ab402e5 100644 --- a/htmlhint-server/src/server.ts +++ b/htmlhint-server/src/server.ts @@ -14,6 +14,7 @@ interface Settings { configFile: string; enable: boolean; options: any; + optionsFile: string; }; [key: string]: any; } @@ -109,6 +110,8 @@ function getConfiguration(filePath: string): any { Object.keys(settings.htmlhint.options).length > 0 ) { options = settings.htmlhint.options; + } else if (settings.htmlhint && settings.htmlhint.optionsFile) { + options = loadConfigurationFile(settings.htmlhint.optionsFile); } else { options = findConfigForHtmlFile(filePath); } diff --git a/htmlhint/CHANGELOG.md b/htmlhint/CHANGELOG.md index ae4b971..735e701 100644 --- a/htmlhint/CHANGELOG.md +++ b/htmlhint/CHANGELOG.md @@ -2,6 +2,10 @@ All notable changes to the "vscode-htmlhint" extension will be documented in this file. +### v1.4.2 (2025-06-04) + +- Fixes missing config file path option. You could now specify a custom path to your `.htmlhintrc` file in the extension settings. e.g. `"htmlhint.optionsFile": "your-project-subfolder/.htmlhintrc"` + ### v1.4.1 (2025-06-04) - Minor optimizations and code cleanup diff --git a/htmlhint/package-lock.json b/htmlhint/package-lock.json index 2fdac36..82e2d40 100644 --- a/htmlhint/package-lock.json +++ b/htmlhint/package-lock.json @@ -1,12 +1,12 @@ { "name": "vscode-htmlhint", - "version": "1.4.1", + "version": "1.4.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "vscode-htmlhint", - "version": "1.4.1", + "version": "1.4.2", "bundleDependencies": [ "vscode-languageclient", "htmlhint", diff --git a/htmlhint/package.json b/htmlhint/package.json index b1749dc..c503210 100644 --- a/htmlhint/package.json +++ b/htmlhint/package.json @@ -3,7 +3,7 @@ "displayName": "HTMLHint", "description": "VS Code integration for HTMLHint - A Static Code Analysis Tool for HTML", "icon": "images/icon.png", - "version": "1.4.1", + "version": "1.4.2", "publisher": "HTMLHint", "galleryBanner": { "color": "#333333", @@ -54,6 +54,11 @@ "type": "object", "default": {}, "description": "The HTMLHint options object to provide args to the HTMLHint command." + }, + "htmlhint.optionsFile": { + "type": "string", + "default": null, + "description": "The HTMLHint options config file path." } } },