style(all): enable eslint/curly lint rule#16753
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.
Pull request overview
This PR enables the ESLint curly rule with the "multi-line" option across the codebase to enforce consistent brace usage for control statements. The rule requires braces for if/while/for statements when they span multiple lines.
Key Changes:
- Adds
"curly": ["error", "multi-line"]to the root oxlintrc.json configuration - Reformats existing if statements that span multiple lines to include braces
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| oxlintrc.json | Adds the curly rule configuration with "multi-line" setting |
| napi/parser/test/parse-raw-worker.ts | Adds braces to multi-line if statements in test code |
| napi/parser/src-js/visit/visitor.js | Adds braces to multi-line type validation checks |
| apps/oxlint/test/utils.ts | Adds braces to multi-line type validation check |
| apps/oxlint/test/fixtures/fixes/plugin.ts | Adds braces to multi-line if statement in test plugin |
| apps/oxlint/test/fixtures/context_getAncestors/.oxlintrc.json | New test fixture configuration file |
| apps/oxlint/src-js/plugins/visitor.ts | Adds braces to multi-line selector complexity check |
| apps/oxlint/src-js/plugins/report.ts | Adds braces to multi-line type validation check |
| apps/oxlint/src-js/plugins/load.ts | Adds braces to three multi-line type validation checks |
| apps/oxlint/src-js/plugins/context.ts | Adds braces to three multi-line null checks in file context |
| apps/oxlint/src-js/package/define.ts | Adds braces to five multi-line type validation and null checks |
The changes are all consistent with the "multi-line" setting of the curly rule, which requires braces when if/while/for statements span multiple lines. All the modifications follow the same pattern and appear correct.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
overlookmotel
left a comment
There was a problem hiding this comment.
Great! It was oxfmt changing max line length to 100 which made all these nasties.
cbf3e54 to
bc7d26f
Compare
Merge activity
|
built on #16749, we can use the linter to be consistent here
a3dad7d to
2acd66e
Compare

built on #16749, we can use the linter to be consistent here