HTMLHint - VS Code ExtensionIntegrates the HTMLHint static analysis tool into Visual Studio Code. ConfigurationThe 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). To install a version to the local project folder, run UsageThe HTMLHint extension will run HTMLHint on your open HTML files and report the number of errors on the Status Bar with details in the Problems panel (View > Problems). Errors in HTML files are highlighted with squiggles and you can hover over the squiggles to see the error message.
RulesThe HTMLHint extension uses the default rules provided by HTMLHint.
.htmlhintrcIf you'd like to modify the rules, you can provide a You can learn more about rule configuration at the HTMLHint Usage page. Additional file typesBy 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 fileIf 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, replacing
Option 2: Associating HTMLHint extension with your file typeIf 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, replacing
SettingsThe HTMLHint extension provides these settings:
You can change settings globally (File > Preferences > User Settings) or per workspace (File > Preferences > Workspace Settings). The Preferences menu is under Code on macOS. Here's an example using the
|