Skip to content

Conversation

@coliff
Copy link
Member

@coliff coliff commented Sep 16, 2025

Fixes: Status: #1703
Replaces deprecated or less preferred glob API usages with updated methods (globSync, globStream) in formatter and htmlhint CLI modules. Removes unused or deprecated options and updates event handling for file matching, improving maintainability and compatibility.

Replaces deprecated or less preferred glob API usages with updated methods (globSync, globStream) in formatter and htmlhint CLI modules. Removes unused or deprecated options and updates event handling for file matching, improving maintainability and compatibility.
@coliff coliff added the dependencies Pull requests that update a dependency file label Sep 16, 2025
@coliff coliff requested a review from Copilot September 16, 2025 08:28
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Updates the HTMLHint project to use modern glob API methods, replacing deprecated APIs with globSync and globStream. Also removes unused HTMLHint configuration rules and updates package dependencies to the latest glob version.

  • Migrates from deprecated glob.sync() and callback-based glob() to modern globSync() and globStream()
  • Removes deprecated glob options (strict, silent) and updates event handling
  • Updates glob dependency from v8 to v9 and removes unnecessary type dependencies

Reviewed Changes

Copilot reviewed 4 out of 7 changed files in this pull request and generated 1 comment.

File Description
website/.htmlhintrc Removes deprecated HTMLHint rule configurations
src/cli/htmlhint.ts Updates glob imports and replaces deprecated API calls with modern equivalents
src/cli/formatter.ts Updates glob import and removes deprecated options
package.json Upgrades glob dependency to v9 and removes @types/glob

silent: true,
})
arrFiles.forEach((file) => {
arrFiles.forEach((file: string) => {
Copy link

Copilot AI Sep 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The explicit type annotation string is redundant here. TypeScript can infer the type from globSync() return value, and the original code didn't have this annotation.

Suggested change
arrFiles.forEach((file: string) => {
arrFiles.forEach((file) => {

Copilot uses AI. Check for mistakes.
gemini-code-assist[bot]

This comment was marked as resolved.

The sourceMappingURL comment at the end of dist/cli/htmlhint.js was updated, likely reflecting a new or rebuilt source map. No other code changes were made.
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Sep 16, 2025

Deploying htmlhint with  Cloudflare Pages  Cloudflare Pages

Latest commit: 90b8929
Status: ✅  Deploy successful!
Preview URL: https://d9833ac1.htmlhint.pages.dev
Branch Preview URL: https://dev-coliff-update-glob.htmlhint.pages.dev

View logs

@codecov

This comment was marked as resolved.

@coliff coliff merged commit 6b2f35a into main Sep 16, 2025
25 checks passed
@coliff coliff deleted the dev/coliff/update-glob branch September 16, 2025 08:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants