mirror of
https://github.com/cole-maxwell1/dotfiles.git
synced 2026-10-27 16:32:49 -05:00
- add conventions for Bash, C#, Go, Python, and TypeScript - add frontend guidance for HTMX, PrimeVue, and Vue - document formatting, typing, testing, async, and framework-specific practices - reference official documentation for framework API details
767 B
767 B
name, description
| name | description |
|---|---|
| bash | Shell scripting conventions (set -euo pipefail, quoting, shellcheck). Use when editing .sh or .bash files. |
Bash Conventions
Robustness
- Begin scripts with
#!/usr/bin/env bashandset -euo pipefail. - Pass
shellcheckcleanly; treat its warnings as bugs.
Quoting and expansion
- Double-quote all variable expansions (
"$var","${array[@]}"). - Prefer
[[ ]]over[ ]; use arrays for argument lists rather than space-separated strings. - Avoid
eval; do not parselsoutput.
Structure
- Declare function-local variables with
local. - Use
trapto clean up temporary files and directories. - Use
printfoverechofor predictable output. - Prefer a
$TMPDIR-based path over hardcoded/tmpliterals.