-
-
Notifications
You must be signed in to change notification settings - Fork 6
Add config linting & autocomplete #221
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add config linting & autocomplete #221
Conversation
This adds JSON Schema support for the extension.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @coliff, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
Summary of Changes
Hello! Gemini here, providing a summary of this pull request. This PR, authored by @coliff, focuses on enhancing the developer experience for users of the vscode-htmlhint extension by adding JSON Schema support for .htmlhintrc configuration files. This enables features like linting and autocomplete for these files directly within VS Code. Additionally, the PR includes several maintenance updates, such as adding funding information, updating Dependabot configuration for better dependency management across different parts of the project, updating the extension version, and making minor documentation and code comment adjustments.
Highlights
- JSON Schema Support: Adds JSON Schema validation and autocomplete for
.htmlhintrcfiles by linking to the schema on schemastore.org inpackage.json. - Dependabot Configuration: Updates the Dependabot configuration (
.github/dependabot.yml) to group dependency updates, increase the open PR limit, and add monitoring for packages in the/htmlhintand/htmlhint-serverdirectories in addition to the root. - Funding Configuration: Adds a
.github/FUNDING.ymlfile to specify funding options for the project. - Version and Engine Updates: Bumps the extension version from 1.1.0 to 1.2.0 in
package.jsonandpackage-lock.json, and updates the minimum required VS Code engine version inpackage-lock.jsonfrom^1.16.0to^1.65.0. - Documentation and Changelog Updates: Updates the
CHANGELOG.mdto include the new JSON Schema feature for version 1.2.0 and formats previous entries. UpdatesREADME.mdto reflect the new embedded HTMLHint version and capitalizes 'HTML' in some descriptions.
Changelog
Click here to see the changelog
- .github/FUNDING.yml
- Added funding configuration file.
- .github/dependabot.yml
- Added dependency grouping for npm packages.
- Increased
open-pull-requests-limitfor npm ecosystems. - Added Dependabot configuration for
/htmlhintand/htmlhint-serverdirectories.
- htmlhint-server/src/server.ts
- Corrected capitalization of 'html' to 'HTML' in comments.
- htmlhint/CHANGELOG.md
- Added entry for v1.2.0 highlighting JSON Schema validation for
.htmlhintrc. - Formatted previous changelog entries with bullet points.
- Added entry for v1.2.0 highlighting JSON Schema validation for
- htmlhint/README.md
- Updated embedded HTMLHint version reference from 1.1.4 to 1.2.0.
- Corrected capitalization of 'html' to 'HTML' in various sections.
- htmlhint/package-lock.json
- Updated package version to 1.2.0.
- Updated minimum required VS Code engine version to ^1.65.0.
- htmlhint/package.json
- Updated package version to 1.2.0.
- Added
jsonValidationconfiguration to link.htmlhintrcfiles to the htmlhint JSON schema.
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.
| Feature | Command | Description |
|---|---|---|
| Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
| Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
| Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
| Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
Config files, JSON bright,
Schema guides the syntax right.
Linting helps us see,
Errors that shouldn't be,
Code review, a guiding light.
Footnotes
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces JSON Schema support for .htmlhintrc files, which is a great enhancement for users to correctly configure HTMLHint. The updates to Dependabot for grouping patch updates and covering sub-packages are also very welcome for maintainability. The addition of a funding file and changelog formatting improvements are good housekeeping.
I've found a few issues, primarily related to configuration consistency and metadata correctness, with one high-severity issue regarding a future date in the changelog. Please see the detailed comments below.
Summary of Findings
- Changelog Date Error: The
htmlhint/CHANGELOG.mdcontains a future date (2025-05-30) for version v1.2.0, which needs correction. - JSON Schema
fileMatchSpecificity: ThejsonValidation.fileMatchpattern inhtmlhint/package.jsonis["/.htmlhintrc"], which only targets root.htmlhintrcfiles. This is inconsistent with the linter's ability to use.htmlhintrcfrom subdirectories. A pattern like["**/.htmlhintrc"]would be more consistent.
Merge Readiness
This pull request introduces several positive changes. However, due to the high-severity issue with the changelog date and a few medium-severity configuration inconsistencies, I recommend addressing these points before merging to ensure accuracy and optimal behavior. I am not authorized to approve pull requests, so please ensure further review and approval as per your team's process once these changes are made.
This adds JSON Schema support for the extension.
Also