Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
root = true

[*]
indent_style = tab
indent_size = 4
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true
charset = utf-8

# md (GitHub shows code fences with 8 spaces)
[*.md]
indent_style = space
indent_size = 2
trim_trailing_whitespace = false

[*.java]
indent_style = tab
indent_size = 4
# Doc: https://youtrack.jetbrains.com/issue/IDEA-170643#focus=streamItem-27-3708697.0-0
ij_java_imports_layout = $*,|,java.**,|,javax.**,|,org.**,|,com.**,|,com.diffplug.**,|,*
ij_java_use_single_class_imports = true
ij_java_class_count_to_use_import_on_demand = 999
ij_java_names_count_to_use_import_on_demand = 999

[*.xml.mustache]
indent_style = space
indent_size = 4

[*.{yml,yaml}]
indent_style = space
indent_size = 2
[*.template]
indent_style = tab
indent_size = 4

# Prevent unexpected automatic indentation when crafting test-cases
[/testlib/src/main/resources/**]
Expand Down
36 changes: 18 additions & 18 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:recommended",
],
packageRules: [
{
groupName: 'Ktlint',
matchPackageNames: [
'com.pinterest.ktlint:*',
]
},
{
groupName: 'OpenRewrite',
matchPackageNames: [
'org.openrewrite.recipe:*',
],
},
]
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:recommended",
],
packageRules: [
{
groupName: 'Ktlint',
matchPackageNames: [
'com.pinterest.ktlint:*',
]
},
{
groupName: 'OpenRewrite',
matchPackageNames: [
'org.openrewrite.recipe:*',
],
},
]
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2016-2025 DiffPlug
* Copyright 2016-2026 DiffPlug
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -87,7 +87,7 @@ private static class State extends NpmFormatterStepStateBase implements Serializ
super(stepName,
new NpmConfig(
replaceDevDependencies(
NpmResourceHelper.readUtf8StringFromClasspath(EslintFormatterStep.class, "/com/diffplug/spotless/npm/eslint-package.json"),
NpmResourceHelper.readUtf8StringFromClasspath(EslintFormatterStep.class, "/com/diffplug/spotless/npm/eslint-package.json.template"),
new TreeMap<>(devDependencies)),
NpmResourceHelper.readUtf8StringFromClasspath(EslintFormatterStep.class,
"/com/diffplug/spotless/npm/common-serve.js",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2016-2025 DiffPlug
* Copyright 2016-2026 DiffPlug
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -68,7 +68,7 @@ private static class State extends NpmFormatterStepStateBase implements Serializ
super(stepName,
new NpmConfig(
replaceDevDependencies(
NpmResourceHelper.readUtf8StringFromClasspath(PrettierFormatterStep.class, "/com/diffplug/spotless/npm/prettier-package.json"),
NpmResourceHelper.readUtf8StringFromClasspath(PrettierFormatterStep.class, "/com/diffplug/spotless/npm/prettier-package.json.template"),
new TreeMap<>(devDependencies)),
NpmResourceHelper.readUtf8StringFromClasspath(PrettierFormatterStep.class,
"/com/diffplug/spotless/npm/common-serve.js",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2016-2025 DiffPlug
* Copyright 2016-2026 DiffPlug
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -75,7 +75,7 @@ public static class State extends NpmFormatterStepStateBase implements Serializa
public State(String stepName, Map<String, String> versions, File projectDir, File buildDir, File cacheDir, NpmPathResolver npmPathResolver, @Nullable TypedTsFmtConfigFile configFile, @Nullable Map<String, Object> inlineTsFmtSettings) throws IOException {
super(stepName,
new NpmConfig(
replaceDevDependencies(NpmResourceHelper.readUtf8StringFromClasspath(TsFmtFormatterStep.class, "/com/diffplug/spotless/npm/tsfmt-package.json"), new TreeMap<>(versions)),
replaceDevDependencies(NpmResourceHelper.readUtf8StringFromClasspath(TsFmtFormatterStep.class, "/com/diffplug/spotless/npm/tsfmt-package.json.template"), new TreeMap<>(versions)),
NpmResourceHelper.readUtf8StringFromClasspath(PrettierFormatterStep.class,
"/com/diffplug/spotless/npm/common-serve.js",
"/com/diffplug/spotless/npm/tsfmt-serve.js"),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2025 DiffPlug
* Copyright 2025-2026 DiffPlug
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -66,7 +66,7 @@ void itCalculatesDifferentNodeModulesDirForDifferentServeJs() throws IOException
}

static String prettierPackageJson(Map<String, String> dependencies) {
String templateContent = NpmResourceHelper.readUtf8StringFromClasspath(NodeServerLayoutTest.class, "/com/diffplug/spotless/npm/prettier-package.json");
String templateContent = NpmResourceHelper.readUtf8StringFromClasspath(NodeServerLayoutTest.class, "/com/diffplug/spotless/npm/prettier-package.json.template");
String dependenciesList = dependencies.entrySet().stream()
.map(entry -> "\"%s\": \"%s\"".formatted(entry.getKey(), entry.getValue()))
.reduce((a, b) -> a + ",\n " + b)
Expand Down
Loading