From 08233931a0d1a8042f9d6442620eb7679e6b6dce Mon Sep 17 00:00:00 2001 From: uncenter <47499684+uncenter@users.noreply.github.com> Date: Fri, 5 Jan 2024 19:33:22 -0500 Subject: [PATCH 1/4] Add prettier/editorconfigs from 11ty/eleventy, update prettier --- .editorconfig | 15 +++------------ .prettierrc.json | 8 ++++++++ package.json | 2 +- 3 files changed, 12 insertions(+), 13 deletions(-) create mode 100644 .prettierrc.json diff --git a/.editorconfig b/.editorconfig index ffb7278020..8780ab7d12 100644 --- a/.editorconfig +++ b/.editorconfig @@ -2,19 +2,10 @@ root = true [*] indent_style = tab -indent_size = 2 end_of_line = lf -insert_final_newline = false +insert_final_newline = true trim_trailing_whitespace = true charset = utf-8 -[*.js] -insert_final_newline = true -indent_style = tab - -[*.json] -indent_style = tab - -[*.css] -insert_final_newline = true -indent_style = tab \ No newline at end of file +[*.yml] +indent_style = space diff --git a/.prettierrc.json b/.prettierrc.json new file mode 100644 index 0000000000..e20202190f --- /dev/null +++ b/.prettierrc.json @@ -0,0 +1,8 @@ +{ + "useTabs": true, + "singleQuote": false, + "semi": true, + "endOfLine": "lf", + "arrowParens": "always", + "printWidth": 100 +} \ No newline at end of file diff --git a/package.json b/package.json index fa04e72957..fc32f88ae9 100644 --- a/package.json +++ b/package.json @@ -71,7 +71,7 @@ "node-fetch": "^2.6.8", "node-retrieve-globals": "^2.0.6", "pagefind": "^1.0.3", - "prettier": "^2.8.4", + "prettier": "^3.1.1", "semver": "^7.5.4", "short-hash": "^1.0.0", "slugify": "^1.6.5", From 3259247782efadb486868910a9c6be09122dd742 Mon Sep 17 00:00:00 2001 From: uncenter <47499684+uncenter@users.noreply.github.com> Date: Wed, 10 Jan 2024 16:48:44 -0500 Subject: [PATCH 2/4] Update npm script --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index fc32f88ae9..0b73ca3c3b 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "create-search-index": "npx pagefind --site \"_site\" --glob \"{docs,blog}/**/*.html\"", "get-new-data": "rm -rf ./src/_data/builtwith/ && npx degit github:11ty/11ty-community/built-with-eleventy src/_data/builtwith/", "get-new-supporters": "eleventy && node node-supporters", - "format": "prettier --write '**/*.{js,css,html,md}'" + "format": "prettier . --write" }, "repository": { "type": "git", From acdc7d617c56575aef339b3f66b98991926fa0d3 Mon Sep 17 00:00:00 2001 From: uncenter <47499684+uncenter@users.noreply.github.com> Date: Thu, 11 Jan 2024 09:58:28 -0500 Subject: [PATCH 3/4] style: add trailing newline --- .prettierrc.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.prettierrc.json b/.prettierrc.json index e20202190f..4aa4e3a7b4 100644 --- a/.prettierrc.json +++ b/.prettierrc.json @@ -5,4 +5,4 @@ "endOfLine": "lf", "arrowParens": "always", "printWidth": 100 -} \ No newline at end of file +} From 61b836f1f6b66a5fd1ce4fc746dc585677d28c67 Mon Sep 17 00:00:00 2001 From: uncenter <47499684+uncenter@users.noreply.github.com> Date: Thu, 11 Jan 2024 21:08:00 -0500 Subject: [PATCH 4/4] Ignore strange directory that Prettier fails on --- .prettierignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 .prettierignore diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000000..5124759a80 --- /dev/null +++ b/.prettierignore @@ -0,0 +1 @@ +src/_includes/examples/pagination/