Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/website/src/scripts/header.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* global window, document, IntersectionObserver, CustomEvent, localStorage, navigator */
/* header.js — burger, drawer, dropdowns, scroll-shrink */

document.addEventListener("DOMContentLoaded", () => {
Expand Down
1 change: 0 additions & 1 deletion .github/website/src/scripts/search.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* global window, document, requestAnimationFrame */
/* search.js — Search palette controller */

import { rankSearchItems, getSearchTokens } from "./search-utils.js";
Expand Down
1 change: 0 additions & 1 deletion .github/website/src/scripts/theme-toggle.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* global window, document, localStorage, CustomEvent, navigator */
/* theme-toggle.js
Handles all .theme-toggle-btn buttons on the page.
Moon = currently light mode (click to go dark)
Expand Down
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

- **Lint Was Blocked by Missing Globals, Not by Code** — eslint reported 1,908 errors across 191 files on `develop`, blocking both `linting.yml` and `testing.yml` (the latter runs `npm run lint:js` as its first step and never reached the tests). 1,687 of those were `no-undef` and came down to just 25 identifiers: the `**/*.cjs` block in `eslint.config.cjs` carried `languageOptions` with only `parserOptions` and no `globals` at all, and that glob covers every `.test.cjs` in the repository, so `describe`, `it`, `expect`, `console` and `process` were undefined there. The Node, CommonJS and Jest global sets are now declared once and shared rather than written out three times, the figma glob matches the `skills/local/plugin-provided` layout it previously missed, `scripts/dashboard` is treated as the browser bundle it is, and the eight vendored copies of `plugin-api-standalone.d.ts` are ignored as third-party typings (one copy already was). Errors drop from 1,908 across 191 files to 47 across 31, with all parse and `no-redeclare` errors cleared.
- **Jest Test Run Blocked by Mismatched Babel/Jest Majors** — `npm run test:js` failed before any test executed: `@babel/core` and its presets/plugins were pinned to the brand-new Babel 8 line (`8.0.1`/`8.0.2`, released 2026-06-16 and ESM-only) while `@babel/runtime` stayed on `^7.29.7`, and separately `@types/jest`/`ts-jest` sat on the Jest 29 line while `jest`/`babel-jest`/`jest-environment-jsdom` were on 30.x — two independent major-version splits in the same toolchain. `ts-jest` was never actually wired into `.jest.config.cjs` (its own header comment says "Uses Babel for transforming JS/TS; no ts-jest required") and is removed as dead weight rather than upgraded. Every `@babel/*` package that had moved to Babel 8 (`@babel/core`, `@babel/preset-env`, `@babel/preset-react`, `@babel/preset-typescript`, `@babel/plugin-transform-class-properties`, `@babel/plugin-transform-object-rest-spread`, `@babel/plugin-transform-runtime`, in both root `package.json` and the `overrides` block) is re-pinned to the latest Babel 7 line, `7.29.7`, matching `@babel/runtime` and avoiding Babel 8's ESM-only breaking change against a repo built entirely on `.cjs` config files; `@babel/plugin-syntax-import-meta` was never on Babel 8 and stays at its existing `7.10.4`; `jest` and `jest-environment-jsdom` are bumped to the matching latest `30.5.1` patch alongside the already-current `babel-jest@30.5.1`; `@types/jest` is bumped to `30.0.0` to match. The suite now runs to completion (4317/4599 tests passing); the remaining failures are pre-existing test debt (a missing `@actions/github` module in one suite, a `minimatch` import-shape bug, stale assertions) unrelated to the transform layer.

- **Lint Was Blocked by Missing Globals, Not by Code** — eslint reported 1,908 errors across 191 files on `develop`, blocking both `linting.yml` and `testing.yml` (the latter runs `npm run lint:js` as its first step and never reached the tests). 1,687 of those were `no-undef` and came down to just 25 identifiers: the `**/*.cjs` block in `eslint.config.cjs` carried `languageOptions` with only `parserOptions` and no `globals` at all, and that glob covers every `.test.cjs` in the repository, so `describe`, `it`, `expect`, `console` and `process` were undefined there. The Node, CommonJS and Jest global sets are now declared once and shared rather than written out three times, the figma glob matches the `skills/local/plugin-provided` layout it previously missed, `scripts/dashboard` is treated as the browser bundle it is, and the eight vendored copies of `plugin-api-standalone.d.ts` are ignored as third-party typings (one copy already was). Errors drop from 1,908 across 191 files to 47 across 31, with all parse and `no-redeclare` errors cleared. The browser-scripts glob missed the repo's nested `.github/website/src/scripts/**` copy (only `website/src/scripts/**` matched), leaving `fetch` undefined in `theme-toggle.js` there; the glob now covers both. That copy's `header.js` and `search.js` still carried their own `/* global */` comments for identifiers the glob now declares (`IntersectionObserver`, `requestAnimationFrame`, etc.), which turned into `no-redeclare` errors the moment the glob widened to cover them; those comments are removed too, alongside `theme-toggle.js`'s.

- **Bugs the Lint Gap Was Hiding** — five scripts called a bare `load(...)` while importing `* as yaml from "js-yaml"`, so every one of those calls would have thrown `ReferenceError: load is not defined` at runtime; they now call `yaml.load`. Two release e2e scenarios had an unquoted `CHANGELOG.md:` object key, a syntax error meaning those files had never parsed. `.markdownlint-cli2.config.cjs` declared `MD024` twice, with JS silently discarding the earlier value. Also removed 12 `/* global */` and 7 `/* eslint-env */` comments that only restated globals the config now provides; eslint-env comments are unsupported in ESLint 9 and were themselves parse errors.

Expand Down
7 changes: 6 additions & 1 deletion eslint.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,12 @@ module.exports = [
// Browser-based JavaScript files (website scripts)
{
// scripts/dashboard is a browser bundle too, not a Node script.
files: ["website/src/scripts/**/*.js", "scripts/dashboard/**/*.js"],
// The .github/-prefixed path covers this repo's own nested copy of the website.
files: [
"website/src/scripts/**/*.js",
".github/website/src/scripts/**/*.js",
"scripts/dashboard/**/*.js",
],
languageOptions: {
parserOptions: {
ecmaVersion: 2024,
Expand Down
Loading
Loading