Skip to content

Commit

Permalink
Scaffold .editorconfig and patch it instead of disabling it.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ambient-Impact committed May 25, 2024
1 parent d13b30f commit 1d02e2c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
6 changes: 5 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,6 @@
"web-root": "web/"
},
"file-mapping": {
"[project-root]/.editorconfig": false,
"[project-root]/.gitattributes": {
"append": "drupal_scaffold/gitattributes_append"
},
Expand Down Expand Up @@ -318,5 +317,10 @@
"web/modules/custom/{$name}": ["type:drupal-custom-module"],
"web/themes/custom/{$name}": ["type:drupal-custom-theme"]
}
},
"scripts": {
"post-drupal-scaffold-cmd": [
"patch -p1 <drupal_scaffold/editorconfig.patch"
]
}
}
15 changes: 15 additions & 0 deletions drupal_scaffold/editorconfig.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff --git a/.editorconfig b/.editorconfig
index 686c443cec..ffd179a154 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -13,5 +13,9 @@ charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

-[composer.{json,lock}]
+# Note that this has been patched via Drupal scaffold from 4 spaces to 2 spaces.
+[composer.json]
+indent_size = 2
+
+[composer.lock]
indent_size = 4

0 comments on commit 1d02e2c

Please sign in to comment.