-
-
Notifications
You must be signed in to change notification settings - Fork 432
Update and refactor glob #1730
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
Update and refactor glob #1730
Conversation
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.
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.
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-basedglob()to modernglobSync()andglobStream() - 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) => { |
Copilot
AI
Sep 16, 2025
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.
[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.
| arrFiles.forEach((file: string) => { | |
| arrFiles.forEach((file) => { |
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.
Deploying htmlhint with
|
| Latest commit: |
90b8929
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://d9833ac1.htmlhint.pages.dev |
| Branch Preview URL: | https://dev-coliff-update-glob.htmlhint.pages.dev |
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.