Skip to content

chore: ESLint v10, GitHub Actions updates, stylelint config migration, and website fixes#1828

Merged
coliff merged 4 commits intomainfrom
copilot/update-stylelint-config-and-github-actions
Mar 21, 2026
Merged

chore: ESLint v10, GitHub Actions updates, stylelint config migration, and website fixes#1828
coliff merged 4 commits intomainfrom
copilot/update-stylelint-config-and-github-actions

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 20, 2026

Batch of maintenance updates: ESLint v9→v10, GitHub Actions version bumps, stylelint config format migration, and Astro SpeculationRules correction.

ESLint v10

  • eslint ^9.x^10.1.0 (latest); added explicit @eslint/js@^10.0.0 dep (required in v10)
  • @typescript-eslint packages 8.44.08.57.1
  • Fixed two no-useless-assignment errors surfaced by v10:
    • src/cli/htmlhint.ts: inlined ruleset as const inside the try block
    • src/core/reporter.ts: moved evidenceLen declaration inside the for loop as const

GitHub Actions

  • Deleted accessibility-alt-text-bot.yml (no longer needed)
  • Version bumps across all workflows:
Action Before After
actions/setup-node v6.2.0 v6.3.0
actions/upload-artifact v6.0.0 v7.0.0
github/codeql-action v4.32.4 v4.33.0
streetsidesoftware/cspell-action v8.2.0 v8.3.0
styfle/cancel-workflow-action 0.13.0 0.13.1

Website

  • Migrated website/.stylelintrc.jsonwebsite/stylelint.config.mjs (ESM format)
  • Astro speculationrules: "prerender""prefetch"
Original prompt

This section details on the original issue you should resolve

<issue_title>Updates</issue_title>
<issue_description>- Change website/.stylelintrc.json to stylelint.config.js.

  • In Astro website config SpeculationRules - change prerender to prefetch.
  • Update all GitHub Actions to latest versions,
  • Delete /.github/workflows/accessibility-alt-text-bot.yml (not needed),
  • Set codeql-analysis.yml not to run on draft PRs.
  • Update ESLint to v10.x (and all plugins to latest versions) - make sure all linting passes!</issue_description>

Comments on the Issue (you are @copilot in this section)


📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.

…int errors

- Convert website/.stylelintrc.json to website/stylelint.config.js
- Change Astro SpeculationRules from prerender to prefetch
- Delete accessibility-alt-text-bot.yml workflow
- Add draft PR filter to codeql-analysis.yml
- Update GitHub Actions versions:
  - actions/setup-node v6.2.0 → v6.3.0
  - actions/upload-artifact v6.0.0 → v7.0.0
  - github/codeql-action v4.32.4 → v4.33.0
  - streetsidesoftware/cspell-action v8.2.0 → v8.3.0
  - styfle/cancel-workflow-action 0.13.0 → 0.13.1
- Update ESLint to v10.x and add @eslint/js, update @typescript-eslint to 8.57.1
- Fix no-useless-assignment errors in htmlhint.ts and reporter.ts

Co-authored-by: coliff <1212885+coliff@users.noreply.github.com>
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages bot commented Mar 20, 2026

Deploying htmlhint with  Cloudflare Pages  Cloudflare Pages

Latest commit: e0e807d
Status: ✅  Deploy successful!
Preview URL: https://4286c0a7.htmlhint.pages.dev
Branch Preview URL: https://copilot-update-stylelint-con.htmlhint.pages.dev

View logs

@coliff coliff marked this pull request as ready for review March 20, 2026 08:29
@coliff coliff self-requested a review as a code owner March 20, 2026 08:29
Copilot AI review requested due to automatic review settings March 20, 2026 08:29
Copilot AI changed the title [WIP] Update website configuration and GitHub Actions versions chore: ESLint v10, GitHub Actions updates, stylelint config migration, and website fixes Mar 20, 2026
Copy link
Copy Markdown
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

This PR updates the project’s website tooling/configuration and CI automation (GitHub Actions), alongside upgrading the repository’s linting toolchain (ESLint + plugins) and applying small refactors to satisfy updated lint rules.

Changes:

  • Replace the website Stylelint JSON config with a JS config file and update Astro SpeculationRules from prerender to prefetch.
  • Update/pin multiple GitHub Actions SHAs and remove the accessibility alt-text bot workflow.
  • Upgrade ESLint and TypeScript-ESLint dependencies and adjust code to satisfy new linting behavior.

Reviewed changes

Copilot reviewed 13 out of 16 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
website/stylelint.config.js New Stylelint config file for the website (replaces JSON config).
website/.stylelintrc.json Removes the old Stylelint JSON configuration.
website/astro.config.mjs Updates SpeculationRules configuration (prerenderprefetch).
src/core/reporter.ts Refactor to resolve lint issues related to assignments in loops.
src/cli/htmlhint.ts Refactor config parsing to resolve no-useless-assignment linting issues.
dist/core/reporter.js Regenerated build output reflecting src/core/reporter.ts changes.
dist/cli/htmlhint.js Regenerated build output reflecting src/cli/htmlhint.ts changes.
package.json Updates ESLint/tooling dependencies (including ESLint v10 and @eslint/js).
package-lock.json Lockfile updates for the ESLint/tooling dependency upgrades.
.github/workflows/website.yml Updates pinned actions/setup-node and CodeQL SARIF upload action versions.
.github/workflows/test.yml Updates pinned actions/setup-node and cancel-workflow action versions.
.github/workflows/spellcheck.yml Updates pinned cspell action version.
.github/workflows/publish.yml Updates pinned actions/setup-node version.
.github/workflows/ossf-scorecard.yml Updates pinned artifact upload + CodeQL SARIF upload actions.
.github/workflows/codeql-analysis.yml Updates pinned CodeQL actions and modifies PR trigger configuration.
.github/workflows/accessibility-alt-text-bot.yml Removes the workflow entirely.

Comment on lines +4 to +7
export default {
extends: ['stylelint-config-recommended'],
rules: {},
}
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

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

website/package.json does not declare "type": "module", so Node will treat stylelint.config.js as CommonJS. Using export default in a CommonJS .js file will throw a syntax error when Stylelint loads the config. Consider either switching this file to CommonJS (module.exports = { ... }) or renaming it to stylelint.config.mjs (or adding type: module) so the ESM syntax is valid.

Suggested change
export default {
extends: ['stylelint-config-recommended'],
rules: {},
}
module.exports = {
extends: ['stylelint-config-recommended'],
rules: {},
};

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@copilot change to stylelint.config.mjs

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Already renamed to stylelint.config.mjs in 429b5b8.

Comment on lines +9 to +16
@@ -10,6 +10,10 @@ on:
branches:
- main
- '!dependabot/**'
types:
- opened
- synchronize
- reopened
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

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

This change doesn't actually stop CodeQL from running on draft PRs: the opened/synchronize/reopened events still fire for drafts, and removing ready_for_review means CodeQL won't automatically run when a draft is marked ready. To skip drafts reliably, add a job-level if: github.event.pull_request.draft == false (for pull_request events) and include ready_for_review in the trigger types (or omit types entirely).

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@copilot revert this change

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Reverted in e0e807d — removed the types: filter and if: condition from codeql-analysis.yml.

@coliff coliff marked this pull request as draft March 20, 2026 11:11
@coliff coliff closed this Mar 21, 2026
@coliff coliff reopened this Mar 21, 2026
@coliff
Copy link
Copy Markdown
Member

coliff commented Mar 21, 2026

@copilot update ESLint to very latest version and change stylelint config to stylelint.config.mjs

…ix CodeQL draft PR filter

- Rename website/stylelint.config.js → website/stylelint.config.mjs (ESM format)
- Update eslint to ^10.1.0 (latest)
- Fix codeql-analysis.yml to truly skip draft PRs: add ready_for_review type and if condition

Co-authored-by: coliff <1212885+coliff@users.noreply.github.com>
Agent-Logs-Url: https://github.com/htmlhint/HTMLHint/sessions/cb0d5317-27c4-420a-a5f6-365a4a7db9cb
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Mar 21, 2026

@copilot update ESLint to very latest version and change stylelint config to stylelint.config.mjs

Done in 429b5b8:

  • Renamed website/stylelint.config.jswebsite/stylelint.config.mjs (ESM syntax now valid)
  • Updated eslint to ^10.1.0 (very latest v10 release)

Comment on lines +4 to +7
export default {
extends: ['stylelint-config-recommended'],
rules: {},
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@copilot change to stylelint.config.mjs

Comment on lines +9 to +16
@@ -10,6 +10,10 @@ on:
branches:
- main
- '!dependabot/**'
types:
- opened
- synchronize
- reopened
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@copilot revert this change

- Revert codeql-analysis.yml: remove types filter and if condition for draft PRs
- website/stylelint.config.mjs remains as ESM format (already renamed)

Co-authored-by: coliff <1212885+coliff@users.noreply.github.com>
Agent-Logs-Url: https://github.com/htmlhint/HTMLHint/sessions/db908583-00db-42ea-8b6d-4db2ec6d737e
Copilot AI requested a review from coliff March 21, 2026 07:19
@coliff coliff marked this pull request as ready for review March 21, 2026 07:21
@coliff coliff merged commit 0dccaed into main Mar 21, 2026
2 checks passed
@coliff coliff deleted the copilot/update-stylelint-config-and-github-actions branch March 21, 2026 07:21
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.

Updates

3 participants