Files
dotfiles/tools/install-ec.sh
Ismo Vuorinen 5f59851c7a chore(tooling): use yarn for linting scripts (#149)
* chore(tooling): use yarn for linting scripts

* chore: fixes and tweaks

* chore(ci): more permissions

* chore: clean up, lint fixes

* chore: clean up, lint fixes

* chore: clean up, lint fixes

* chore(lint): fix yamllint errors and warnings

* chore(lint): lint fixes

* chore(lint): lint fixes
2025-08-15 09:06:22 +03:00

19 lines
468 B
Bash
Executable File

#!/usr/bin/env bash
# Install editorconfig-checker if not already installed
set -euo pipefail
if command -v ec > /dev/null 2>&1; then
exit 0
fi
if ! command -v yarn > /dev/null 2>&1; then
echo "yarn is required to install editorconfig-checker" >&2
exit 1
fi
if yarn --version | grep -q '^1\.'; then
yarn global add --silent editorconfig-checker@"${VERSION:-latest}"
else
yarn dlx --quiet editorconfig-checker@"${VERSION:-latest}" --version > /dev/null
fi