Enable automatic linting and select languages
Enable automatic linting on file save for selected languages. Configure TypeScript/JavaScript and Go linting with Biome, ESLint, or golangci-lint.
/plugin marketplace add b-open-io/claude-peacock/plugin install peacock@b-open-ioEnable automatic linting on file save with language selection.
Usage:
/peacock:enable-linting
Check if the config file exists:
test -f ~/.claude/.peacock-config
If it doesn't exist, create it with defaults:
cat > ~/.claude/.peacock-config << 'EOF'
# Peacock configuration
# This file is sourced by statusline.sh and lint hooks
# Editor configuration
EDITOR_SCHEME=""
# Linting configuration
LINT_ENABLED="true"
LINT_TYPESCRIPT="true"
LINT_GO="true"
EOF
Then output:
✅ Linting enabled for all languages
Linting will now run automatically when you save files.
Languages enabled:
• TypeScript/JavaScript (via Biome or ESLint)
• Go (via golangci-lint)
To customize which languages are linted, run /peacock:setup
To disable linting, run /peacock:disable-linting
And exit.
If config file exists, ask which languages to enable:
Question:
Store the selected values.
Update the config file using sed or awk to modify the LINT_* variables:
# Enable linting
sed -i.bak 's/^LINT_ENABLED=.*/LINT_ENABLED="true"/' ~/.claude/.peacock-config
# Set TypeScript based on selection
if [[ "$TYPESCRIPT_SELECTED" == "true" ]]; then
sed -i.bak 's/^LINT_TYPESCRIPT=.*/LINT_TYPESCRIPT="true"/' ~/.claude/.peacock-config
else
sed -i.bak 's/^LINT_TYPESCRIPT=.*/LINT_TYPESCRIPT="false"/' ~/.claude/.peacock-config
fi
# Set Go based on selection
if [[ "$GO_SELECTED" == "true" ]]; then
sed -i.bak 's/^LINT_GO=.*/LINT_GO="true"/' ~/.claude/.peacock-config
else
sed -i.bak 's/^LINT_GO=.*/LINT_GO="false"/' ~/.claude/.peacock-config
fi
# Remove backup file
rm ~/.claude/.peacock-config.bak
Build a list of enabled languages based on selection, then output:
✅ Linting enabled
Linting will now run automatically when you save files.
Languages enabled:
$ENABLED_LANGUAGES
To disable linting, run /peacock:disable-linting
Where $ENABLED_LANGUAGES is: