Skip to content

Commit deccf26

Browse files
committed
chore(ide): configure markdown linting and devcontainer setup
- Configure markdownlint to enforce 70-character line length - Add Prettier configuration for markdown formatting with 70-char wrap - Enable format-on-save and linting for markdown files in VS Code - Add devcontainer configuration with Python 3.14 and required dependencies - Configure devcontainer with markdown formatting extensions pre-installed
1 parent 0ab9829 commit deccf26

File tree

6 files changed

+143
-4
lines changed

6 files changed

+143
-4
lines changed

.devcontainer/devcontainer.json

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
{
2+
"name": "Use Case Tree Method Documentation",
3+
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
4+
5+
"features": {
6+
"ghcr.io/devcontainers/features/python:1": {
7+
"version": "3.14"
8+
},
9+
"ghcr.io/devcontainers/features/git:1": {},
10+
"ghcr.io/devcontainers/features/github-cli:1": {}
11+
},
12+
13+
"postCreateCommand": "bash .devcontainer/post-create.sh",
14+
15+
"customizations": {
16+
"vscode": {
17+
"extensions": [
18+
"esbenp.prettier-vscode",
19+
"DavidAnson.vscode-markdownlint",
20+
"ms-python.python",
21+
"ms-python.vscode-pylance",
22+
"squidfunk.mkdocs-material"
23+
],
24+
"settings": {
25+
"python.defaultInterpreterPath": "/usr/local/bin/python",
26+
"python.linting.enabled": true,
27+
"python.linting.pylintEnabled": false,
28+
"python.formatting.provider": "none",
29+
"[python]": {
30+
"editor.defaultFormatter": "ms-python.black-formatter",
31+
"editor.formatOnSave": true
32+
},
33+
"[markdown]": {
34+
"editor.formatOnSave": true,
35+
"editor.defaultFormatter": "esbenp.prettier-vscode",
36+
"editor.rulers": [70],
37+
"editor.wordWrap": "off"
38+
},
39+
"markdownlint.run": "onSave",
40+
"markdownlint.fixOnSave": true,
41+
"prettier.printWidth": 70,
42+
"prettier.proseWrap": "always"
43+
}
44+
}
45+
},
46+
47+
"remoteEnv": {
48+
"VIRTUAL_ENV": "${containerWorkspaceFolder}/.venv",
49+
"PATH": "${containerWorkspaceFolder}/.venv/bin:${env:HOME}/.cargo/bin:${containerEnv:PATH}"
50+
},
51+
52+
"forwardPorts": [8000],
53+
54+
"postStartCommand": "echo 'Dev container ready!'"
55+
}
56+

.devcontainer/post-create.sh

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
#!/bin/bash
2+
set -e
3+
4+
echo "🚀 Setting up Use Case Tree Method dev container..."
5+
6+
# Install system dependencies
7+
echo "📦 Installing system dependencies..."
8+
apt-get update
9+
apt-get install -y \
10+
build-essential \
11+
libcairo2-dev \
12+
libfreetype6-dev \
13+
libffi-dev \
14+
libpango1.0-dev \
15+
libjpeg-dev \
16+
libpng-dev \
17+
zlib1g-dev \
18+
graphviz \
19+
curl
20+
21+
# Install uv
22+
echo "📦 Installing uv..."
23+
curl -LsSf https://astral.sh/uv/install.sh | sh
24+
25+
# Add uv to PATH for current session and future sessions
26+
export PATH="$HOME/.cargo/bin:$PATH"
27+
echo 'export PATH="$HOME/.cargo/bin:$PATH"' >> ~/.bashrc
28+
29+
# Verify uv installation
30+
if ! command -v uv &> /dev/null; then
31+
echo "❌ Failed to install uv"
32+
exit 1
33+
fi
34+
35+
echo "✅ uv installed: $(uv --version)"
36+
37+
# Install Python dependencies
38+
echo "📦 Installing Python dependencies..."
39+
uv sync
40+
41+
echo "✅ Dev container setup complete!"
42+
echo ""
43+
echo "You can now run:"
44+
echo " - make docs-serve (start MkDocs server)"
45+
echo " - make docs-build (build documentation)"
46+
echo " - uv run mkdocs --help"
47+

.devcontainerignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
**/.git
2+
**/.venv
3+
**/node_modules
4+
**/site
5+
**/__pycache__
6+
**/*.pyc
7+
**/.pytest_cache
8+
**/.mypy_cache
9+
**/dist
10+
**/build
11+
**/*.egg-info
12+

.markdownlint.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"MD013": {
3-
"line_length": 140,
4-
"heading_line_length": 140,
5-
"code_block_line_length": 140
3+
"line_length": 70,
4+
"heading_line_length": 70,
5+
"code_block_line_length": 70
66
},
77
"MD025": {
88
"front_matter_title": ""

.prettierrc.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"printWidth": 70,
3+
"proseWrap": "always",
4+
"overrides": [
5+
{
6+
"files": "*.md",
7+
"options": {
8+
"printWidth": 70,
9+
"proseWrap": "always"
10+
}
11+
}
12+
]
13+
}
14+

.vscode/settings.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,15 @@
66
"tag:yaml.org,2002:python/name",
77
"tag:yaml.org,2002:python/object/apply"
88
],
9-
"makefile.configureOnOpen": false
9+
"makefile.configureOnOpen": false,
10+
"[markdown]": {
11+
"editor.formatOnSave": true,
12+
"editor.defaultFormatter": "esbenp.prettier-vscode",
13+
"editor.rulers": [70],
14+
"editor.wordWrap": "off"
15+
},
16+
"markdownlint.run": "onSave",
17+
"markdownlint.fixOnSave": true,
18+
"prettier.printWidth": 70,
19+
"prettier.proseWrap": "always"
1020
}

0 commit comments

Comments
 (0)