-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJustfile
More file actions
107 lines (81 loc) · 2.28 KB
/
Justfile
File metadata and controls
107 lines (81 loc) · 2.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
set dotenv-load := true
set dotenv-override := true
set positional-arguments := true
set unstable := true
# List available recipes
default:
@just --list
# Format code
format: format-spelling format-config format-docs
# Format configuration files
format-config:
biome format --write .
# Format documentation
format-docs *args:
just format-markdown {{ args }}
# Format Markdown files
format-markdown *args:
rumdl fmt {{ if args == "" { "." } else { args } }}
# Fix spelling
format-spelling *args:
codespell -w {{ if args == "" { "." } else { args } }}
# Fix code issues
fix: fix-config fix-docs
# Fix configuration files
fix-config:
biome check --write .
# Fix documentation
fix-docs *args:
just fix-markdown {{ args }}
# Fix Markdown files
fix-markdown *args:
rumdl check --fix {{ if args == "" { "." } else { args } }}
# Run all linters
lint: lint-docs lint-config lint-spelling
# Lint configuration files
lint-config: lint-json lint-yaml
# Lint documentation
lint-docs *args:
just lint-markdown {{ args }}
just lint-prose {{ args }}
# Lint JSON/JS/TS files
lint-json:
biome check --files-ignore-unknown=true .
# Lint Markdown files
lint-markdown *args:
rumdl check {{ if args == "" { "." } else { args } }}
# Lint prose in Markdown files
lint-prose *args:
vale {{ if args == "" { "." } else { args } }}
# Check spelling
lint-spelling:
codespell
# Lint YAML files
lint-yaml:
yamllint --strict .
# Install dependencies
install:
vale sync
# Run pre-commit hooks on changed files
prek:
prek
# Run pre-commit hooks on all files
prek-all:
prek run --all-files
# Install pre-commit hooks
prek-install:
prek install
# Sync Vale styles and dictionaries
vale-sync:
vale sync
# Generate full changelog
generate-changelog:
cog changelog | { echo "# Changelog"; cat; } | rumdl check -d MD024 --fix --stdin > CHANGELOG.md
# Preview changelog since last release
preview-changelog:
cog changelog --at $(git describe --tags)..HEAD -t full_hash | rumdl check -d MD041 --fix --stdin
# Generate release notes
[script]
generate-release-notes version="":
v=$([[ -n "{{ version }}" ]] && echo "v{{ version }}" || echo "..$(git rev-parse HEAD)" )
cog changelog --at $v -t full_hash | rumdl check -d MD024,MD041 --isolated --fix --stdin