diff --git a/.cspell.json b/.cspell.json index 3f53b7b..263520c 100644 --- a/.cspell.json +++ b/.cspell.json @@ -3,6 +3,7 @@ "words": [ "autobuild", "codeql", + "coliff", "fnames", "htmlhint", "htmlhintrc", diff --git a/.gemini/config.yaml b/.gemini/config.yaml new file mode 100644 index 0000000..e673871 --- /dev/null +++ b/.gemini/config.yaml @@ -0,0 +1,9 @@ +have_fun: false +code_review: + disable: false + comment_severity_threshold: MEDIUM + max_review_comments: -1 + pull_request_opened: + help: false + summary: false + code_review: true diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..9a5d4d2 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,3 @@ +open_collective: htmlhint +ko_fi: coliff +github: coliff diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 08f40b9..fcf3587 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -6,9 +6,42 @@ updates: interval: weekly labels: - github-actions + - package-ecosystem: npm directory: "/" + groups: + all-dependencies: + patterns: + - "*" + update-types: + - "patch" schedule: interval: monthly versioning-strategy: increase - open-pull-requests-limit: 1 + open-pull-requests-limit: 2 + + - package-ecosystem: npm + directory: "/htmlhint" + groups: + all-dependencies: + patterns: + - "*" + update-types: + - "patch" + schedule: + interval: monthly + versioning-strategy: increase + open-pull-requests-limit: 2 + + - package-ecosystem: npm + directory: "/htmlhint-server" + groups: + all-dependencies: + patterns: + - "*" + update-types: + - "patch" + schedule: + interval: monthly + versioning-strategy: increase + open-pull-requests-limit: 2 diff --git a/.github/workflows/spellcheck.yml b/.github/workflows/spellcheck.yml index 8ae79ac..551b93e 100644 --- a/.github/workflows/spellcheck.yml +++ b/.github/workflows/spellcheck.yml @@ -19,3 +19,4 @@ jobs: check_dot_files: false incremental_files_only: true inline: warning + strict: false diff --git a/htmlhint-server/src/server.ts b/htmlhint-server/src/server.ts index 7653354..4d2d68f 100644 --- a/htmlhint-server/src/server.ts +++ b/htmlhint-server/src/server.ts @@ -78,7 +78,7 @@ function makeDiagnostic( } /** - * Get the html-hint configuration settings for the given html file. This method will take care of whether to use + * Get the HTMLHint configuration settings for the given HTML file. This method will take care of whether to use * VS Code settings, or to use a .htmlhintrc file. */ function getConfiguration(filePath: string): any { @@ -121,7 +121,7 @@ function getConfiguration(filePath: string): any { } /** - * Given the path of an html file, this function will look in current directory & parent directories + * Given the path of an HTML file, this function will look in current directory & parent directories * to find a .htmlhintrc file to use as the linter configuration. The settings are */ function findConfigForHtmlFile(base: string) { diff --git a/htmlhint/CHANGELOG.md b/htmlhint/CHANGELOG.md index d05d968..005d87e 100644 --- a/htmlhint/CHANGELOG.md +++ b/htmlhint/CHANGELOG.md @@ -2,22 +2,25 @@ All notable changes to the "vscode-htmlhint" extension will be documented in this file. +### v1.2.0 (2025-05-30) + +- Extension now can automatically validate your .htmlhintrc configuration file using JSON Schema (https://json.schemastore.org/htmlhint.json) + ### v1.1.0 (2025-05-28) -Migrate extension to use @types/vscode which means fewer dependencies, better compatibility with future VS Code versions -and more flexibility for testing +- Migrate extension to use @types/vscode which means fewer dependencies and better compatibility with future VS Code versions ### v1.0.8 (2025-05-27) -Update HTMLHint to v1.2.0 +- Update HTMLHint to v1.2.0 ### v1.0.7 (2025-03-19) -Fix build issue +- Fix build issue ### v1.0.6 (2025-03-19) -Fix for issues appearing even when files are closed +- Fix for issues appearing even when files are closed ### v1.0.5 (2023-05-17) diff --git a/htmlhint/README.md b/htmlhint/README.md index 1d40822..53a5106 100644 --- a/htmlhint/README.md +++ b/htmlhint/README.md @@ -6,7 +6,7 @@ Integrates the [HTMLHint](https://github.com/htmlhint/HTMLHint) static analysis ## Configuration -The HTMLHint extension will attempt to use the locally installed HTMLHint module (the project-specific module if present, or a globally installed HTMLHint module). If a locally installed HTMLHint isn't available, the extension will use the embedded version (current version 1.1.4). +The HTMLHint extension will attempt to use the locally installed HTMLHint module (the project-specific module if present, or a globally installed HTMLHint module). If a locally installed HTMLHint isn't available, the extension will use the embedded version (current version 1.2.0). To install a version to the local project folder, run `npm install --save-dev htmlhint`. To install a global version on the current machine, run `npm install --global htmlhint`. @@ -51,9 +51,9 @@ You can learn more about rule configuration at the HTMLHint [Usage page](https:/ By default, HTMLHint will run on any files associated with the "html" language service (i.e., ".html" and ".htm" files). If you'd like to use the HTMLHint extension with additional file types, you have two options: -### Option 1: Treating your file like any other html file +### Option 1: Treating your file like any other HTML file -If you would like the file type to be treated as any other html file (including syntax highlighting, as well as HTMLHint linting), you'll need to associate the extension with the html language service. Add the following to your VS Code [settings](https://code.visualstudio.com/docs/getstarted/settings), replacing `"*.ext"` with your file extension. +If you would like the file type to be treated as any other HTML file (including syntax highlighting, as well as HTMLHint linting), you'll need to associate the extension with the HTML language service. Add the following to your VS Code [settings](https://code.visualstudio.com/docs/getstarted/settings), replacing `"*.ext"` with your file extension. ```json { @@ -65,7 +65,7 @@ If you would like the file type to be treated as any other html file (including ### Option 2: Associating HTMLHint extension with your file type -If your file type already has an associated language service other than "html", and you'd like HTMLHint to process those file types, you will need to associate the HTMLHint extension with that language service. Add the following to your VS Code [settings](https://code.visualstudio.com/docs/getstarted/settings), replacing `"mylang"` with your language service. For example, if you want HTMLHint to process `.twig` files, you would use `"twig"`. Note that with this configuration, **you need to open an html file first** to activate the HTMLHint extension. Otherwise, you won't see any linter errors, (the extension is hard-coded to activate when the html language service activates). +If your file type already has an associated language service other than "html", and you'd like HTMLHint to process those file types, you will need to associate the HTMLHint extension with that language service. Add the following to your VS Code [settings](https://code.visualstudio.com/docs/getstarted/settings), replacing `"mylang"` with your language service. For example, if you want HTMLHint to process `.twig` files, you would use `"twig"`. Note that with this configuration, **you need to open an HTML file first** to activate the HTMLHint extension. Otherwise, you won't see any linter errors, (the extension is hard-coded to activate when the HTML language service activates). ```json { diff --git a/htmlhint/package-lock.json b/htmlhint/package-lock.json index 118c657..00c8dbf 100644 --- a/htmlhint/package-lock.json +++ b/htmlhint/package-lock.json @@ -1,12 +1,12 @@ { "name": "vscode-htmlhint", - "version": "1.1.0", + "version": "1.2.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "vscode-htmlhint", - "version": "1.1.0", + "version": "1.2.0", "license": "SEE LICENSE IN LICENSE.md", "dependencies": { "vscode-languageclient": "3.5.1" @@ -18,7 +18,7 @@ "vscode-test": "^1.6.1" }, "engines": { - "vscode": "^1.16.0" + "vscode": "^1.65.0" } }, "node_modules/@tootallnate/once": { diff --git a/htmlhint/package.json b/htmlhint/package.json index 3e1983a..1279890 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.1.0", + "version": "1.2.0", "publisher": "HTMLHint", "galleryBanner": { "color": "#333333", @@ -56,7 +56,15 @@ "description": "The HTMLHint options object to provide args to the HTMLHint command." } } - } + }, + "jsonValidation": [ + { + "fileMatch": [ + "/.htmlhintrc" + ], + "url": "https://json.schemastore.org/htmlhint.json" + } + ] }, "scripts": { "vscode:prepublish": "npm run compile",