chore(eslint): require block statements via curly: all#2188
Merged
Conversation
Adds the `curly: ["error", "all"]` ESLint rule so single-line bodies
on `if`/`else`/`for`/`while` must be wrapped in `{ }`. Runs
`eslint --fix` + `oxfmt` over the affected files (8 packages, 25
sources).
pcuenca
approved these changes
May 22, 2026
Co-authored-by: Pedro Cuenca <pedro@huggingface.co>
coyotte508
approved these changes
May 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
curly: ["error", "all"]so single-lineif/else/for/whilebodies must be wrapped in{ }.eslint --fix+oxfmt.Affected packages:
agents,gguf,hub,inference,jinja,ollama-utils,space-header,tasks.Test plan
pnpm -r --parallel lintpasses (rule applied, no remaining violations).pnpm formatclean.Note
Low Risk
Low risk: this is a repo-wide linting/style change that only adds required braces to single-line control statements, with no intended behavior changes.
Overview
Enforces brace-wrapped control statements by enabling ESLint
curly: ["error", "all"].Updates existing code across multiple packages (agents, hub, inference, jinja, scripts, etc.) to comply by converting one-line
if/for/whilebodies into block statements, without changing logic.Reviewed by Cursor Bugbot for commit 06f6557. Bugbot is set up for automated code reviews on this repo. Configure here.