Skip to content

Commit 508dd69

Browse files
committed
bumping default prettier version
1 parent bb843ce commit 508dd69

File tree

6 files changed

+13
-46
lines changed

6 files changed

+13
-46
lines changed

CHANGES.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (
1212
## [Unreleased]
1313
### Added
1414
* Added support for npm-based [ESLint](https://eslint.org/)-formatter for javascript and typescript ([#1433](https://github.com/diffplug/spotless/pull/1433))
15-
1615
### Changes
16+
* Bump default Version for `prettier` from `2.0.5` to `2.8.1`
1717
* Bump the dev version of Gradle from `7.5.1` to `7.6` ([#1409](https://github.com/diffplug/spotless/pull/1409))
1818
* We also removed the no-longer-required dependency `org.codehaus.groovy:groovy-xml`
1919
* Breaking changes to Spotless' internal testing infrastructure `testlib` ([#1443](https://github.com/diffplug/spotless/pull/1443))
@@ -22,6 +22,7 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (
2222
* `StepHarnessWithFile` now takes a `ResourceHarness` in its constructor to handle the file manipulation parts
2323
* Standardized that we test exception *messages*, not types, which will ease the transition to linting later on
2424

25+
2526
## [2.31.1] - 2023-01-02
2627
### Fixed
2728
* Improve memory usage when using git ratchet ([#1426](https://github.com/diffplug/spotless/pull/1426))

lib/src/main/java/com/diffplug/spotless/npm/PrettierFormatterStep.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public class PrettierFormatterStep {
4242
public static final String NAME = "prettier-format";
4343

4444
public static final Map<String, String> defaultDevDependencies() {
45-
return defaultDevDependenciesWithPrettier("2.0.5");
45+
return defaultDevDependenciesWithPrettier("2.8.1");
4646
}
4747

4848
public static final Map<String, String> defaultDevDependenciesWithPrettier(String version) {

testlib/src/main/resources/npm/prettier/config/typescript.configfile.clean

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
export class MyVeryOwnControllerWithARatherLongNameThatIsNotReallyNecessary
22
extends AbstractController
3-
implements DisposeAware, CallbackAware {
3+
implements DisposeAware, CallbackAware
4+
{
45
public myValue: string[];
56

67
constructor(

testlib/src/main/resources/npm/prettier/config/typescript.defaults.clean

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
export class MyVeryOwnControllerWithARatherLongNameThatIsNotReallyNecessary
22
extends AbstractController
3-
implements DisposeAware, CallbackAware {
3+
implements DisposeAware, CallbackAware
4+
{
45
public myValue: string[];
56

67
constructor(private myService: Service, name: string, private field: any) {

testlib/src/main/resources/npm/prettier/filetypes/javascript-es5/javascript-es5.clean

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,5 @@
11
var numbers = [
2-
1,
3-
2,
4-
3,
5-
4,
6-
5,
7-
6,
8-
7,
9-
8,
10-
9,
11-
10,
12-
11,
13-
12,
14-
13,
15-
14,
16-
15,
17-
16,
18-
17,
19-
18,
20-
19,
21-
20,
2+
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
223
];
234

245
var p = {
@@ -32,7 +13,8 @@ var p = {
3213
var str = "Hello, world!";
3314
var str2 = str.charAt(3) + str[0];
3415

35-
var multilinestr = "Hello \
16+
var multilinestr =
17+
"Hello \
3618
World";
3719
function test(a, b) {
3820
return a + b;

testlib/src/main/resources/npm/prettier/filetypes/javascript-es6/javascript-es6.clean

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,5 @@
11
var numbers = [
2-
1,
3-
2,
4-
3,
5-
4,
6-
5,
7-
6,
8-
7,
9-
8,
10-
9,
11-
10,
12-
11,
13-
12,
14-
13,
15-
14,
16-
15,
17-
16,
18-
17,
19-
18,
20-
19,
21-
20,
2+
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
223
];
234

245
const p = {
@@ -32,7 +13,8 @@ const p = {
3213
const str = "Hello, world!";
3314
var str2 = str.charAt(3) + str[0];
3415

35-
var multilinestr = "Hello \
16+
var multilinestr =
17+
"Hello \
3618
World";
3719
function test(a, b = "world") {
3820
let combined = a + b;

0 commit comments

Comments
 (0)