-
-
Notifications
You must be signed in to change notification settings - Fork 723
refactor(napi/parser): fix lint errors #13185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
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. |
There was a problem hiding this 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-disablecomments 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.
ab3967c to
1d1719f
Compare
1d1719f to
4dd2386
Compare
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.
4dd2386 to
5baa4f1
Compare

Same as #13184.
#13173 enabled Oxlint for all the repo, but we currently skip
napidirectory.Fix all errors that Oxlint flags in
napi/parser.We currently can't turn on Oxlint for the directory, because
oxlint-disablecomments don't work for type-aware rules, but we should be able to once that's fixed.