Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"words": [
"autobuild",
"codeql",
"coliff",
"fnames",
"htmlhint",
"htmlhintrc",
Expand Down
9 changes: 9 additions & 0 deletions .gemini/config.yaml
Original file line number Diff line number Diff line change
@@ -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
3 changes: 3 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
open_collective: htmlhint
ko_fi: coliff
github: coliff
35 changes: 34 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions .github/workflows/spellcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ jobs:
check_dot_files: false
incremental_files_only: true
inline: warning
strict: false
4 changes: 2 additions & 2 deletions htmlhint-server/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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) {
Expand Down
13 changes: 8 additions & 5 deletions htmlhint/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
8 changes: 4 additions & 4 deletions htmlhint/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.

Expand Down Expand Up @@ -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
{
Expand All @@ -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
{
Expand Down
6 changes: 3 additions & 3 deletions htmlhint/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 10 additions & 2 deletions htmlhint/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down