Skip to content

Allow devDependency imports in TypeScript spec files - #1844

Open
PaulHax wants to merge 2 commits into
mainfrom
eslint-unused-directives
Open

Allow devDependency imports in TypeScript spec files#1844
PaulHax wants to merge 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.

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.
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