Skip to content

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented Aug 18, 2025

Same as #13184.

#13173 enabled Oxlint for all the repo, but we currently skip napi directory.

Fix all errors that Oxlint flags in napi/parser.

We currently can't turn on Oxlint for the directory, because oxlint-disable comments don't work for type-aware rules, but we should be able to once that's fixed.

Copy link
Member Author


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions github-actions bot added the C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior label Aug 18, 2025
@overlookmotel overlookmotel marked this pull request as ready for review August 18, 2025 12:06
Copilot AI review requested due to automatic review settings August 18, 2025 12:06
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes lint errors identified by Oxlint in the napi/parser directory as part of enabling Oxlint across the entire repository. The changes primarily involve adding oxlint-disable comments for unavoidable lint violations and making minor code improvements.

  • Added oxlint-disable comments for intentionally unused variables in catch blocks and test functions
  • Removed unnecessary try-catch blocks and unused variables
  • Fixed early returns in conditional statements to avoid implicit returns
  • Updated JSDoc tags and function type annotations

Reviewed Changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
napi/parser/wrap.mjs Added lint disable comment for unused catch variable
napi/parser/wrap.cjs Added lint disable comment for unused catch variable
napi/parser/test/typescript-make-units-from-test.cjs Removed unused catch variable
napi/parser/test/parser.test-d.ts Added lint disable comment for test without explicit expect
napi/parser/test/parse-raw.test.ts Removed unnecessary try-catch and added lint disable comments
napi/parser/test/parse-raw-worker.mjs Fixed early returns and removed unused catch variable
napi/parser/test/lazy-deserialization.test.ts Replaced expect calls with error throwing and added lint disable comments
napi/parser/test/esm.test.ts Added lint disable comments for conditional expects
napi/parser/raw-transfer/visitor.js Added lint disable comment and updated JSDoc tags
napi/parser/raw-transfer/supported.js Added lint disable comment for unused catch variable
napi/parser/raw-transfer/node-array.js Updated JSDoc tag from @constructor to @Class
napi/parser/example.mjs Added lint disable comment for spread operation
napi/parser/build-browser-bundle.mjs Changed function call to await
napi/parser/bench.bench.mjs Added lint disable comments for unused variables and parameters

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@overlookmotel overlookmotel force-pushed the 08-18-refactor_napi_parser_fix_lint_errors branch from ab3967c to 1d1719f Compare August 18, 2025 12:19
@overlookmotel overlookmotel force-pushed the 08-18-refactor_napi_parser_fix_lint_errors branch from 1d1719f to 4dd2386 Compare August 18, 2025 15:06
@overlookmotel overlookmotel added the 0-merge Merge with Graphite Merge Queue label Aug 18, 2025
Copy link
Member Author

overlookmotel commented Aug 18, 2025

Merge activity

Same as #13184.

#13173 enabled Oxlint for all the repo, but we currently skip `napi` directory.

Fix all errors that Oxlint flags in `napi/parser`.

We currently can't turn on Oxlint for the directory, because `oxlint-disable` comments don't work for type-aware rules, but we should be able to once that's fixed.
@graphite-app graphite-app bot force-pushed the 08-18-refactor_napi_parser_fix_lint_errors branch from 4dd2386 to 5baa4f1 Compare August 18, 2025 22:14
@graphite-app graphite-app bot merged commit 5baa4f1 into main Aug 18, 2025
16 checks passed
@graphite-app graphite-app bot deleted the 08-18-refactor_napi_parser_fix_lint_errors branch August 18, 2025 22:19
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Aug 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants