prettier-java-next-line 2.11.1 → 2.11.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/NOTICE +7 -0
- package/README.md +16 -1
- package/dist/index.cjs +2147 -2016
- package/dist/index.d.cts +2 -11
- package/dist/index.d.mts +3 -13
- package/dist/index.mjs +2147 -2016
- package/package.json +2 -2
package/NOTICE
CHANGED
|
@@ -3,3 +3,10 @@ Copyright 2018-2026 the original author or authors from the JHipster project.
|
|
|
3
3
|
|
|
4
4
|
For more information on the prettier-java project, see https://github.com/jhipster/prettier-java
|
|
5
5
|
prettier-java is part of the JHipster organization on GitHub, for more information on JHipster, see https://www.jhipster.tech/
|
|
6
|
+
|
|
7
|
+
prettier-java-next-line
|
|
8
|
+
Copyright 2025-2026 Craig Motlin and contributors.
|
|
9
|
+
|
|
10
|
+
prettier-java-next-line is a fork of prettier-java that adds a braceStyle option for
|
|
11
|
+
placing opening braces on the next line (Allman style) or the same line.
|
|
12
|
+
For more information on the prettier-java-next-line project, see https://github.com/motlin/prettier-java-next-line
|
package/README.md
CHANGED
|
@@ -105,7 +105,22 @@ public class Example
|
|
|
105
105
|
|
|
106
106
|
## Upstream
|
|
107
107
|
|
|
108
|
-
|
|
108
|
+
Behavior comes from [Prettier Java](https://github.com/jhipster/prettier-java#readme), except for the options above and these differences:
|
|
109
|
+
|
|
110
|
+
- `throws`, `extends` and `implements` clauses always start on their own line, even when the declaration fits on one line.
|
|
111
|
+
- In same-line mode, a class, interface, enum or record declaration with an `extends` or `implements` clause and a non-empty body puts its opening `{` on its own line, so the clause doesn't run into the body:
|
|
112
|
+
|
|
113
|
+
```java
|
|
114
|
+
class Example
|
|
115
|
+
extends Base
|
|
116
|
+
{
|
|
117
|
+
|
|
118
|
+
void method()
|
|
119
|
+
throws Exception {
|
|
120
|
+
doSomething();
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
```
|
|
109
124
|
|
|
110
125
|
## License
|
|
111
126
|
|