mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-01-26 11:14:08 +00:00
* 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
19 lines
468 B
Bash
Executable File
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
|