Skip to content

Added eslint and fixed issues that were caught. - #39

Merged
Yoosseph merged 4 commits into
Yoosseph:mainfrom
Zwee42:eslint
Oct 9, 2026
Merged

Yoosseph merged 4 commits into
Yoosseph:mainfrom
Zwee42:eslint

Conversation

@Zwee42

@Zwee42 Zwee42 commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Add the repository's first typed ESLint setup and enforce code quality in CI. React hook mistakes in both .ts and .tsx files now fail the lint check, including missing effect dependencies. JSX accessibility rules remain scoped to .tsx.

CI
  npm ci
  npm run typecheck        # TypeScript 7 application compiler
  npm run typecheck:tests  # TypeScript 6 tests + Vite configuration
  npm run lint
  npm test
  npm run build
  • Add the flat ESLint configuration, TypeScript 6 alias for typed linting, and documented lint/typecheck commands. The application compiler remains TypeScript 7.0.2.
  • Fix the original lint findings and the findings introduced by the newer tour code; incorporate current main while preserving the label hover and click behavior.
  • Complete the structure tree's roving focus: one Tab entry point, Up/Down, parent/child Left/Right, Home/End, keyboard selection, and a visible focus ring. Search selection still expands and reveals the selected item.
  • Add seven regression tests covering hook enforcement and tree entry points. Lint fixture tests opt out of single-run parser inference because they repeatedly lint in-memory snippets; the production lint configuration remains type-aware.
  • Keep the JSX accessibility plugin's existing ESLint 10 dependency override. Version 6.10.2 declares a peer range ending at ESLint 9; the override is validated by the lint check rather than implying declared upstream support.

Evidence

  • Before: .ts hook mistakes were unchecked; a missing .tsx effect dependency produced zero errors and one warning. The initial expanded tree had 20 Tab stops.
    After: Missing dependencies and conditional hooks fail regression tests in both extensions. Browser verification confirms one Tab stop, parent/child navigation, Home/End, Tab exit, selection reveal, and the visible focus ring, without console errors.
  • Local validation: npm run lint, both typechecks, all 218 tests (also with CI=true), and npm run build pass.
  • GitHub CI: all checks passed for commit cffe9b6, including both typechecks, lint, 218 tests, and build.

Merge Danger

Door: two-way; the change can be reverted.

Blast Radius: tooling and tree keyboard interaction. CI is stricter, and keyboard users traverse the tree using arrows instead of tabbing through every row.

Closes #42.

@vercel

vercel Bot commented Oct 8, 2026

Copy link
Copy Markdown

@Zwee42 is attempting to deploy a commit to the Yoseph's projects Team on Vercel.

A member of the Team first needs to authorize it.

Zwee42 added 2 commits October 9, 2026 02:03
Rebased onto the new main (tour, root/sinus, docs commits) and resolved
the Engine.ts merge conflict (kept both the new onHover handler and the
void-wrapped onClick). The tour feature's code added 15 errors and 1
warning under the eslint setup; fixed:

- tour.ts: wrap AbortSignal.reason in an Error for promise rejects
- tour.test.ts: type the .catch(error) param as unknown
- tourTargets.test.ts: type-only import for the mocked module, Manifest
  cast for the JSON.parse registry build
- Engine.test.ts: type the entries map, drop unneeded async
- GuidedTour.tsx: reset tour state via render-time adjustment instead of
  setState in an effect; read readiness through the store accessor so the
  exhaustive-deps rule is satisfied without restarting the tour; drop
  redundant non-null assertions after the early return; wrap startGuide
  handlers
- SearchPanel.tsx / TopBar.tsx: wrap detached store methods

Verified: lint 0 errors/warnings, typecheck, tsc6, 211 tests, build, and
headless browser tour check (auto-start, pause/resume, advance, skip,
replay resets to step 1, no console errors).
@Yoosseph
Yoosseph merged commit ddaea93 into Yoosseph:main Oct 9, 2026
1 of 2 checks passed
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.

Add EsLint to have stricter patterns and enforce with CI

2 participants