Skip to content

fix: restore array literal spacing#893

Merged
jtkiesel merged 1 commit into
jhipster:mainfrom
jtkiesel:fix/restore-array-literal-spacing
May 18, 2026
Merged

fix: restore array literal spacing#893
jtkiesel merged 1 commit into
jhipster:mainfrom
jtkiesel:fix/restore-array-literal-spacing

Conversation

@jtkiesel
Copy link
Copy Markdown
Contributor

What changed with this PR:

The spacing within the braces of an array literal have been restored. They were removed improperly due to semantic similarity to JS array literals. In the future we may decide to support the bracketSpacing option, though Prettier includes that option in a list that "are not the type of options we’re happy to have" (source).

Example

Input

String[] array = {"a", "b", "c"};

Output

String[] array = { "a", "b", "c" };

Relative issues or prs:

Closes #882

@jtkiesel jtkiesel force-pushed the fix/restore-array-literal-spacing branch from c48578f to 2b0b739 Compare May 18, 2026 22:45
@jtkiesel jtkiesel merged commit 44a4002 into jhipster:main May 18, 2026
6 checks passed
@jtkiesel jtkiesel deleted the fix/restore-array-literal-spacing branch May 18, 2026 22:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[2.9.2] Missing whitespace in curly brackets

1 participant