--- source: crates/rome_formatter_test/src/snapshot_builder.rs info: test_file: js/module/prettier-differences/fill-array-comments.js --- # Input ```js [ // Prettier prints the `-2` element on the same line as the `-3`. // This is the case because Prettier doesn't add virtual groups around `fill` elements, making it return `true` when it // encounters the first hard line break. As it happens, this line comment contains a hard line break, making // Prettier believe that the `-3` with this leading comment all fits on the line, which, obviously, isn't the case. -3, -2 ] ``` ============================= # Outputs ## Output 1 ----- Indent style: Tab Line width: 80 Quote style: Double Quotes Quote properties: As needed Trailing comma: All Semicolons: Always ----- ```js [ // Prettier prints the `-2` element on the same line as the `-3`. // This is the case because Prettier doesn't add virtual groups around `fill` elements, making it return `true` when it // encounters the first hard line break. As it happens, this line comment contains a hard line break, making // Prettier believe that the `-3` with this leading comment all fits on the line, which, obviously, isn't the case. -3, -2, ]; ``` # Lines exceeding max width of 80 characters ``` 3: // This is the case because Prettier doesn't add virtual groups around `fill` elements, making it return `true` when it 4: // encounters the first hard line break. As it happens, this line comment contains a hard line break, making 5: // Prettier believe that the `-3` with this leading comment all fits on the line, which, obviously, isn't the case. ```