-
-
Notifications
You must be signed in to change notification settings - Fork 115
Closed
Labels
area: bug 🐛Something isn't workingSomething isn't workingstatus: PR doneThe PR to fix this issue is doneThe PR to fix this issue is donetheme: Re-Writer
Description
We want to stay as close as possible to the reformatting style of Prettier JS
Below are some examples that should be reviewed:
- TODO
var databaseSizeBeforeCreate = userRepository.findAll().collectList().block().size();
// PrettierJS =>
var databaseSizeBeforeCreate = userRepository
.findAll()
.collectList()
.block()
.size();
// Prettier-Java =>
var databaseSizeBeforeCreate = userRepository.findAll()
.collectList()
.block()
.size();
- TODO
var LONGER_LONGER_LONGER_LONGER_LONGER_LOCALE_REQUEST_ATTRIBUTE_NAME = AngularCookieLocaleContextResolver.class.getName() + ".LOCALE";
// PrettierJS =>
var LONGER_LONGER_LONGER_LONGER_LONGER_LOCALE_REQUEST_ATTRIBUTE_NAME =
AngularCookieLocaleContextResolver.class.getName() + ".LOCALE";
private static final String LOCALE_REQUEST_ATTRIBUTE_NAME = AngularCookieLocaleContextResolver.class.getName()+ ".LOCALE";
// Prettier-Java =>
private static final String LOCALE_REQUEST_ATTRIBUTE_NAME = AngularCookieLocaleContextResolver
.class
.getName()
+ ".LOCALE";
// It seems prettier tries to put the second variable on a second line and then only try to break the second variable if it still exceeds the 80 character line
- PR Fix expression print #223 (merged)
if(aVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongName && anotherVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongName)
{ // do something
}
// PrettierJS =>
if (
aVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongName &&
anotherVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongName
) {
// do something
}
// Prettier-Java =>
if (aVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongName
&& anotherVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongName) { // do something
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area: bug 🐛Something isn't workingSomething isn't workingstatus: PR doneThe PR to fix this issue is doneThe PR to fix this issue is donetheme: Re-Writer