Skip to content

Commit e99a675

Browse files
committed
Add pre-commit config
1 parent ff65930 commit e99a675

8 files changed

+56
-38
lines changed

.pre-commit-config.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v4.3.0
4+
hooks:
5+
- id: check-added-large-files
6+
- id: check-case-conflict
7+
- id: check-merge-conflict
8+
- id: detect-private-key
9+
- id: end-of-file-fixer
10+
exclude: '.*\.ipynb'
11+
- id: trailing-whitespace
12+
- repo: https://github.com/codespell-project/codespell
13+
rev: "v2.2.1"
14+
hooks:
15+
- id: codespell
16+
args: ["-I", "codespell.txt"]
17+
- repo: https://github.com/pre-commit/mirrors-prettier
18+
rev: "v3.0.0-alpha.2"
19+
hooks:
20+
- id: prettier
21+
22+
ci:
23+
autoupdate_schedule: monthly

README.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,14 @@ on top of the file.
66

77
## Overview of the snippets
88

9-
* Display internal links in all caps. This was
9+
- Display internal links in all caps. This was
1010
originally a design feature by the [Sanctum][sanctum] theme, but got dropped in
1111
newer releases
12-
* Make embeds blend into notes
13-
* Disable strikethrough for ticked checkboxes
14-
* Highlight bold darkmode: Bold text in dark mode doesn't stand out very much, so
12+
- Make embeds blend into notes
13+
- Disable strikethrough for ticked checkboxes
14+
- Highlight bold darkmode: Bold text in dark mode doesn't stand out very much, so
1515
this snippets makes it underlined and all-caps.
16-
* Justify all text in obsidian
17-
16+
- Justify all text in obsidian
1817

1918
[obsidian]: https://obsidian.md/
2019
[sanctum]: https://github.com/jdanielmourao/obsidian-sanctum/

all-caps-internal-links.css

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
.cm-s-obsidian span.cm-hmd-internal-link,
22
.markdown-preview-view .internal-link {
3-
text-decoration: none;
4-
font-weight: 550;
5-
text-transform: uppercase;
6-
font-size: .9em;
7-
letter-spacing: .125em;
8-
border-radius: 4px;
3+
text-decoration: none;
4+
font-weight: 550;
5+
text-transform: uppercase;
6+
font-size: 0.9em;
7+
letter-spacing: 0.125em;
8+
border-radius: 4px;
99
}

clean-embeds-all.css

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,6 @@
8080

8181
/* End link show/hide stuff */
8282

83-
84-
8583
/* remove border and scroll */
8684
/* unfortunately needs !important for some themes */
8785
.markdown-preview-view .markdown-embed,
@@ -92,7 +90,7 @@
9290
}
9391

9492
.markdown-preview-view .markdown-embed-content,
95-
.markdown-preview-view .markdown-embed-content > .markdown-preview-view {
93+
.markdown-preview-view .markdown-embed-content > .markdown-preview-view {
9694
max-height: unset;
9795
padding: 0 !important; /* !important for "Pisum" theme */
9896
margin: 0;
@@ -104,16 +102,14 @@
104102
display: none;
105103
}
106104

107-
108105
/* remove vertical space added by markdown-preview-sizer */
109-
div.markdown-preview-sizer.markdown-preview-section {
106+
div.markdown-preview-sizer.markdown-preview-section {
110107
min-height: unset !important;
111108
padding-bottom: 0 !important;
112109
}
113110

114111
/* special considerations for printing (PDF export) */
115112
@media print {
116-
117113
/* remove frontmatter box if "Show frontmatter" was enabled */
118114
/* Also remove metadata table from "Metatable" plugin */
119115
pre.frontmatter,

codespell.txt

Whitespace-only changes.

disable_strikethrough_checkbox.css

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
/* From this thread: https://forum.obsidian.md/t/how-to-remove-strikethrough-for-checkboxes/5753/16 */
22

33
.markdown-preview-view ul > li.task-list-item.is-checked {
4-
text-decoration:none;
5-
color:var(--text-normal);
4+
text-decoration: none;
5+
color: var(--text-normal);
66
}
77

88
.markdown-preview-view ol > li.task-list-item.is-checked {
9-
text-decoration:none;
10-
color:var(--text-normal);
9+
text-decoration: none;
10+
color: var(--text-normal);
1111
}
1212

13-
.markdown-source-view.mod-cm6 .HyperMD-task-line[data-task]:not([data-task=" "]) {
14-
text-decoration:none;
15-
color: var(--text-normal);
13+
.markdown-source-view.mod-cm6
14+
.HyperMD-task-line[data-task]:not([data-task=" "]) {
15+
text-decoration: none;
16+
color: var(--text-normal);
1617
}

highlight-bold-darkmode.css

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
.theme-dark .cm-strong, .theme-dark strong {
2-
font-weight: 550;
3-
text-transform: uppercase;
4-
font-size: .9em;
5-
letter-spacing: .125em;
6-
border-radius: 4px;
7-
text-decoration: underline;
1+
.theme-dark .cm-strong,
2+
.theme-dark strong {
3+
font-weight: 550;
4+
text-transform: uppercase;
5+
font-size: 0.9em;
6+
letter-spacing: 0.125em;
7+
border-radius: 4px;
8+
text-decoration: underline;
89
}
9-
10-

justified.css

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/* reading mode */
22
.markdown-preview-view p {
3-
text-align: justify;
4-
text-justify: inter-word;
3+
text-align: justify;
4+
text-justify: inter-word;
55
}
66

77
/* source view and live preview */
88
.markdown-source-view.mod-cm6 .cm-line {
9-
text-align: justify;
10-
text-justify: inter-word;
9+
text-align: justify;
10+
text-justify: inter-word;
1111
}

0 commit comments

Comments
 (0)