Skip to content

Conversation

@coliff
Copy link
Member

@coliff coliff commented Jun 19, 2025

This pull request introduces a new auto-fix for the attr-whitespace rule in the vscode-htmlhint extension. The changes include implementing the fix logic, integrating it into the existing auto-fix framework, and updating documentation and versioning to reflect the new feature.

Implementation of the attr-whitespace auto-fix:

  • Added a new createAttrWhitespaceFix function to handle attribute values with leading or trailing whitespace. This function identifies and trims whitespace in attribute values while ensuring the fix is applied only near the diagnostic position. [1] [2] [3]

  • Updated the createAutoFixes function to include the new attr-whitespace rule, ensuring the auto-fix is triggered when this rule is violated.

Documentation and configuration updates:

  • Added the attr-whitespace rule to the README.md file and enabled it in the .htmlhintrc configuration file. [1] [2]

  • Updated the CHANGELOG.md file to document the addition of the attr-whitespace auto-fix in version 1.10.3.

Version bump:

  • Incremented the extension version from 1.10.2 to 1.10.3 in package.json and package-lock.json to reflect the new feature release. [1] [2]

gemini-code-assist[bot]

This comment was marked as resolved.

@coliff coliff changed the title feat: Add attr-whitespace autofix feat: Add attr-whitespace autofix Jun 19, 2025
@coliff coliff force-pushed the dev/coliff/feat-attr-whitespace-fix branch from 3dc23f2 to e373388 Compare June 19, 2025 15:57
@coliff coliff merged commit c59792b into main Jun 19, 2025
10 checks passed
@coliff coliff deleted the dev/coliff/feat-attr-whitespace-fix branch June 19, 2025 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants