You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.
Rome tries to fit all object pattern members on a single line. Prettier uses a more sophisticated approach to determine if the pattern should be formatted on a single line or broken across multiple ones. Playground
A few examples:
Input
// Break over multiple lines if it contains a sub patternconst{b: {test}}=test;// non-shorthand and whole statement exceeds line widthconst{ id,isStatic: isStatic, method, methodId, g }=privateNamesMap.get(name);// default and whole statement exceeds line widthconst{ id, isStatic =true, method, methodId, gee }=privateNamesMap.get(name);// sub patternconst{ id,isStatic: {sub}, method, methodId, gee }=privateNamesMap;
Prettier
// Break over multiple lines if it contains a sub patternconst{b: { test },}=test;// non-shorthand and whole statement exceeds line widthconst{
id,isStatic: isStatic,
method,
methodId,
g,}=privateNamesMap.get(name);// default and whole statement exceeds line widthconst{
id,
isStatic =true,
method,
methodId,
gee,}=privateNamesMap.get(name);// sub patternconst{
id,isStatic: { sub },
method,
methodId,
gee,}=privateNamesMap;
Rome
// Break over multiple lines if it contains a sub patternconst{b: { test }}=test;// non-shorthand and whole statement exceeds line widthconst{ id,isStatic: isStatic, method, methodId, g }=privateNamesMap.get(name,);// default and whole statement exceeds line widthconst{ id, isStatic =true, method, methodId, gee }=privateNamesMap.get(name);// sub patternconst{ id,isStatic: { sub }, method, methodId, gee }=privateNamesMap;
Expected
Rome's formatting to match Prettier's
The text was updated successfully, but these errors were encountered:
Rome tries to fit all object pattern members on a single line. Prettier uses a more sophisticated approach to determine if the pattern should be formatted on a single line or broken across multiple ones. Playground
A few examples:
Input
Prettier
Rome
Expected
Rome's formatting to match Prettier's
The text was updated successfully, but these errors were encountered: