Skip to content

Commit c91dc63

Browse files
committedMay 21, 2024
sync editorconfig with prettier, and configure prettier with .prettierrc.yml
1 parent 4b18702 commit c91dc63

File tree

3 files changed

+11
-25
lines changed

3 files changed

+11
-25
lines changed
 

‎.editorconfig

+4-5
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,22 @@
55
root = true
66

77
[*]
8-
98
indent_style = space
109
indent_size = 4
1110

12-
# We recommend you to keep these unchanged
1311
end_of_line = lf
1412
charset = utf-8
1513

1614
trim_trailing_whitespace = true
1715
insert_final_newline = true
1816

19-
# There's no reason to keep this, it just seems to be the overwhelming style currently.
2017
[*.html]
2118
indent_size = 2
2219
[*.tx]
2320
indent_size = 2
24-
25-
# yaml indents are weird
21+
[*.md]
22+
indent_size = 2
23+
max_line_length = 80
2624
[*.{yml,yaml}]
2725
indent_size = 2
26+
quote_type = single

‎.prettierrc.yml

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
overrides:
2+
- files: '*.md'
3+
options:
4+
proseWrap: always

‎precious.toml

+3-20
Original file line numberDiff line numberDiff line change
@@ -42,28 +42,11 @@ ignore-stderr = [
4242
"The .+ file is not unique",
4343
]
4444

45-
[commands.prettier-markdown]
45+
[commands.prettier]
4646
type = "both"
47-
include = "**/*.md"
47+
include = [ "**/*.md", "**/*.yml", "**/*.yaml" ]
4848
cmd = [
49-
"npx", "-s", "prettier",
50-
"--no-config",
51-
"--print-width", "80",
52-
"--prose-wrap", "always",
53-
]
54-
lint-flags = "--check"
55-
tidy-flags = "--write"
56-
ok-exit-codes = 0
57-
lint-failure-exit-codes = 1
58-
ignore-stderr = [ "Code style issues" ]
59-
60-
[commands.prettier-yaml]
61-
type = "both"
62-
include = "**/*.yml"
63-
cmd = [
64-
"npx", "-s", "prettier",
65-
"--no-config",
66-
"--single-quote",
49+
"npx", "-s", "prettier"
6750
]
6851
lint-flags = "--check"
6952
tidy-flags = "--write"

0 commit comments

Comments
 (0)