Skip to content

style(all): enable eslint/curly lint rule#16753

Merged
graphite-app[bot] merged 1 commit intomainfrom
c/12-11-style_all_enable_eslint_curly_lint_rule
Dec 11, 2025
Merged

style(all): enable eslint/curly lint rule#16753
graphite-app[bot] merged 1 commit intomainfrom
c/12-11-style_all_enable_eslint_curly_lint_rule

Conversation

@camc314
Copy link
Copy Markdown
Contributor

@camc314 camc314 commented Dec 11, 2025

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

@github-actions github-actions bot added A-linter Area - Linter A-parser Area - Parser A-cli Area - CLI A-linter-plugins Area - Linter JS plugins C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior labels Dec 11, 2025
Copy link
Copy Markdown
Contributor Author

camc314 commented Dec 11, 2025


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.

@camc314 camc314 marked this pull request as ready for review December 11, 2025 12:54
Copilot AI review requested due to automatic review settings December 11, 2025 12:54
Copy link
Copy Markdown
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 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.

Copy link
Copy Markdown
Member

@overlookmotel overlookmotel left a comment

Choose a reason for hiding this comment

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

Great! It was oxfmt changing max line length to 100 which made all these nasties.

@camc314 camc314 force-pushed the c/12-11-style_all_enable_eslint_curly_lint_rule branch 2 times, most recently from cbf3e54 to bc7d26f Compare December 11, 2025 13:19
@overlookmotel overlookmotel added the 0-merge Merge with Graphite Merge Queue label Dec 11, 2025
Copy link
Copy Markdown
Member

overlookmotel commented Dec 11, 2025

Merge activity

  • Dec 11, 2:48 PM UTC: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Dec 11, 2:49 PM UTC: overlookmotel added this pull request to the Graphite merge queue.
  • Dec 11, 2:51 PM UTC: The Graphite merge queue couldn't merge this PR because it was not satisfying all requirements (Failed CI: 'Spell Check').
  • Dec 11, 2:55 PM UTC: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Dec 11, 2:57 PM UTC: camc314 added this pull request to the Graphite merge queue.
  • Dec 11, 2:58 PM UTC: Merged by the Graphite merge queue.

built on #16749, we can use the linter to be consistent here
@graphite-app graphite-app bot force-pushed the c/12-11-style_all_enable_eslint_curly_lint_rule branch from a3dad7d to 2acd66e Compare December 11, 2025 14:49
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Dec 11, 2025
@camc314 camc314 added the 0-merge Merge with Graphite Merge Queue label Dec 11, 2025
@graphite-app graphite-app bot merged commit 2acd66e into main Dec 11, 2025
46 of 48 checks passed
@graphite-app graphite-app bot deleted the c/12-11-style_all_enable_eslint_curly_lint_rule branch December 11, 2025 14:58
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Dec 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-cli Area - CLI A-linter Area - Linter A-linter-plugins Area - Linter JS plugins A-parser Area - Parser 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