mirror of
https://github.com/webinstall/webi-installers.git
synced 2026-03-03 18:00:18 +00:00
25 lines
612 B
Bash
25 lines
612 B
Bash
#!/bin/bash
|
|
set -e
|
|
set -u
|
|
|
|
function __init_jshint() {
|
|
OLD_PATH="${PATH}"
|
|
PATH="${HOME}/.local/opt/node/bin:${PATH}"
|
|
if [ -z "$(npm --version 2> /dev/null)" ]; then
|
|
export PATH="${OLD_PATH}"
|
|
webi node
|
|
export PATH="${HOME}/.local/opt/node/bin:${PATH}"
|
|
fi
|
|
npm install -g jshint@latest
|
|
|
|
curl -fsS \
|
|
-o ~/.jshintrc.defaults.json5 \
|
|
'https://raw.githubusercontent.com/jshint/jshint/master/examples/.jshintrc' || true
|
|
|
|
curl -fsS \
|
|
-o ~/.jshintrc.webi.json5 \
|
|
"${WEBI_HOST}/packages/jshint/jshintrc.webi.json5" || true
|
|
}
|
|
|
|
__init_jshint
|