Skip to content

Allow devDependency imports in TypeScript spec files - #1844

Merged
BryonLewis merged 2 commits into
mainfrom
eslint-unused-directives
Aug 18, 2026
Merged

Allow devDependency imports in TypeScript spec files#1844
BryonLewis merged 2 commits into
mainfrom
eslint-unused-directives

Conversation

@PaulHax

@PaulHax PaulHax commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator

Allow devDependency imports in TypeScript spec files

The client lint command did not report unused ESLint directives. As a result, obsolete directives
could remain after the related lint errors were fixed.

The Airbnb import/no-extraneous-dependencies rule also permits test dependencies only in
JavaScript test files. TypeScript spec files needed a manual directive when they imported vitest
or @vue/test-utils.

Changes

  • Make the client lint command report unused ESLint directives.
  • Remove directives that no longer suppress an error.
  • Permit devDependency imports in **/*.spec.ts files.
  • Remove the related directives from 18 TypeScript spec files.
  • Correct two existing server lint findings: a test docstring and a redundant exception type.

This PR does not change application or test behavior. It changes the lint gate and removes obsolete
lint comments.

Hierarchy prerequisite

The hierarchy PRs add TypeScript spec files that import devDependencies, so this change lets them
pass the stricter lint gate without manual suppressions.

Stack

This is PR 1 of 9. Next: preserve Desktop import warnings.

  1. Current — Allow devDependency imports in TypeScript spec files
  2. Preserve warnings from every Desktop import file
  3. Copy source metadata when creating a single-camera soft clone
  4. Add hierarchical track classification
  5. Centralize hierarchical classification changes
  6. Replace mutable merged tracks with read-only projections
  7. Make track lifecycle operations classification-safe
  8. Add lossless DIVE KWCOCO classification support
  9. Define raw and resolved classification boundaries

This PR contains 2 commits on origin/main:

  • 455c1524 Remove stale eslint-disable directives
  • 637984a3 Allow devDependency imports in spec files

Overall: 64 files, +18/-89.

@PaulHax
PaulHax force-pushed the eslint-unused-directives branch from 637984a to f2eb233 Compare August 18, 2026 18:29
Enable --report-unused-disable-directives in the client lint script so
unnecessary suppressions fail the gate, and drop the directives that no
longer suppress anything.
Airbnb's import/no-extraneous-dependencies allowlist only covers .js and
.jsx test files, so every TypeScript spec needed a hand-written disable
comment. Scope the rule to permit devDependencies in *.spec.ts and drop
the now-redundant suppressions.
@PaulHax
PaulHax force-pushed the eslint-unused-directives branch from f2eb233 to 2563e23 Compare August 18, 2026 19:47
@BryonLewis
BryonLewis merged commit c5e72d4 into main Aug 18, 2026
3 checks passed
@BryonLewis
BryonLewis deleted the eslint-unused-directives branch August 18, 2026 20:06
romleiaj added a commit that referenced this pull request Aug 19, 2026
Client (eslint with main's new --report-unused-disable-directives, and
vue-tsc, both now clean):
- Drop import/no-extraneous-dependencies directives in spec files that
  main's #1844 made redundant, and no-await-in-loop ones that no longer
  fire.
- function-paren-newline: collapse or one-arg-per-line the offending
  calls.
- autoRegisterSelection: remove the dead empty-bin guard (bins <= usable
  guarantees every bin spans a frame) instead of using `continue`.
- AutoRegisterDialog: unnest the pairCount ternary.
- Justify the two reactive-touch `void` expressions with a scoped disable.
- ViewerLoader: remove loadMultiCamMetadata, orphaned when the in-process
  auto-register service path was dropped; guard the null multiCamMedia
  branch in populateMultiCamImagePathGetters.
- useMediaController: per-camera controllers now carry translateCameraFrame
  and cameraFrameToSlot, which the MediaController interface requires.
- common.spec: seed and type the registration fixtures at format v2.

Server (flake8/black/isort/mypy, now at parity with main):
- black/isort formatting in registration_output.py and run_pipeline.py,
  wrap an over-long message in multicam_pipeline.py, D209 docstring in
  models.py.
- _invert3 accepts Optional input so the leftToRight/rightToLeft
  fallback typechecks.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012JeU2DKMZAN2d4TSymbJyz
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.

2 participants