Space inside parens () , brackets [] {} #2360
Replies: 3 comments 19 replies
-
I’m not a fan of this option per se, but it does appear there is indeed quite the demand for it. I’m not sure we should prioritize it right now, but I think if someone would be willing to create a PR for this we can accept it. |
Beta Was this translation helpful? Give feedback.
-
The core team and maintainers discussed the proposal, and we agree that we have a strong reasons to implement the feature. The main reason is the accessibility concerns. Now, for the people that are interested in the proposal, I would ask you to lay down a concrete proposal, possibly an RFC, so we can discuss it and come up with a solid plan. At the moment we don't have the manpower to implement the feature straightaway, and there are still a lot of things to discuss. Here's some pointers:
|
Beta Was this translation helpful? Give feedback.
-
Dears, thank you for making biome!
I am copying this over from a prettier issue, which reflects a very common coding style.
This has also been discussed on the prettier issues page
It has become a very common coding style among many frameworks to include spaces inside braces and brackets.
Biome provides the option
javascript.formatter.bracketSpacing
but that does not include braces, i.e. spaces around function parameters and arguments.Examples
Function arguments
function foo( one, two, three ) {
Instead of
function foo(one, two, three) {
Arrays
const array = [ 1, 2, 3, 4 ]
instead of:
const array = [1, 2, 3, 4]
Methods
array.slice( 0, 1 )
instead of
array.slice(0, 1)
Rationale
Beta Was this translation helpful? Give feedback.
All reactions