Lint: enforce no-undef in oracle-gaps test files (a missing import reached a commit)

Open Beginner friendly
#85 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
eslint, javascript

Research direction

Start from the ESLint config at the repository root (and any config under packages/oracles/) to see which overrides currently apply to packages/oracles/oracle-gaps/** and how other packages declare globals. Add an override for that glob enabling no-undef with the Node globals the issue names (process, structuredClone, clearTimeout) declared, then run the project's lint script to collect findings, including the posix/realPathOf usage from commit a489353. Done means lint reports the missing imports rather than the rule staying silent.

Written by the indexing model from the issue text.

Description

A driver file imported isWithin from paths.mjs but used posix and realPathOf without importing them. The reference was not caught by lint, so the first Arclet run failed with ReferenceError: posix is not defined. The project's lint config does not enable no-undef for these files (in TypeScript-aware configs the check is usually off, and the .mjs files lack a globals declaration that would make it precise). Node globals such as process, structuredClone, and clearTimeout would need declaring for the rule to be usable there.

Ask: enable no-undef (with the Node globals declared) for packages/oracles/oracle-gaps/** and report the findings, or name the rule that should catch this class. Not changed in #73, per the maintainers' request. Found while reviewing #73 (commit a489353).

Dominant language
JavaScript
Stars
5
Forks
1
Avg merge
6h
Merged PRs (30d)
56

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from TanStack/oracles

All issues in TanStack/oracles

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.