mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-02-04 22:48:49 +00:00
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
This commit is contained in:
18
tools/install-ec.sh
Executable file
18
tools/install-ec.sh
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/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
|
||||
Reference in New Issue
Block a user