--- source: crates/biome_formatter_test/src/snapshot_builder.rs info: js/module/call/simple_arguments.js --- # Input ```js // Tests around grouping layouts and simple arguments // Cases where the second argument is too complex to group. foo(() => { foo }, Math.floor(a + b), ); foo(() => { foo }, Math.floor(a, b), ); foo(() => { foo }, Math.floor(/123456/), ); foo(() => { foo }, a[(1,2)] ); foo( () => { foo; }, arr[Math.floor(1 + 2)], ); foo( () => { foo; }, a || b + 1, ); foo( () => { foo; }, a + b ?? 1, ); // Cases where the second argument is simple enough to group. foo(() => { foo }, [] ); foo(() => { foo }, activities[1] ); foo(() => { foo }, Math.floor(/1234/), ); foo(() => { foo }, a + b, ); foo(() => { foo; }, a || b); foo(() => { foo }, ++b, ); foo(() => { foo }, +!-+b, ); foo(() => { foo }, bar.baz.long, ); foo(() => { foo; }, arr[Math.floor(1)]); foo(() => { foo; }, [Math.floor(1 + 2)]); ``` ============================= # Outputs ## Output 1 ----- Indent style: Tab Indent width: 2 Line ending: LF Line width: 80 Quote style: Double Quotes JSX quote style: Double Quotes Quote properties: As needed Trailing comma: All Semicolons: Always Arrow parentheses: Always Bracket spacing: true Bracket same line: false Attribute Position: Auto ----- ```js // Tests around grouping layouts and simple arguments // Cases where the second argument is too complex to group. foo( () => { foo; }, Math.floor(a + b), ); foo( () => { foo; }, Math.floor(a, b), ); foo( () => { foo; }, Math.floor(/123456/), ); foo( () => { foo; }, a[(1, 2)], ); foo( () => { foo; }, arr[Math.floor(1 + 2)], ); foo( () => { foo; }, a || b + 1, ); foo( () => { foo; }, a + b ?? 1, ); // Cases where the second argument is simple enough to group. foo(() => { foo; }, []); foo(() => { foo; }, activities[1]); foo(() => { foo; }, Math.floor(/1234/)); foo(() => { foo; }, a + b); foo(() => { foo; }, a || b); foo(() => { foo; }, ++b); foo(() => { foo; }, +!-+b); foo(() => { foo; }, bar.baz.long); foo(() => { foo; }, arr[Math.floor(1)]); foo(() => { foo; }, [Math.floor(1 + 2)]); ```