Skip to content

Commit 5221553

Browse files
authored
Merge pull request #157 from yshrsmz/npm-v9
support npm v9
2 parents dae7461 + a162164 commit 5221553

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

script.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,17 @@ echo '::group::🐶 Installing reviewdog ... https://github.com/reviewdog/review
1111
curl -sfL https://raw.githubusercontent.com/reviewdog/reviewdog/master/install.sh | sh -s -- -b "${TEMP_PATH}" "${REVIEWDOG_VERSION}" 2>&1
1212
echo '::endgroup::'
1313

14-
if [ ! -f "$(npm bin)/eslint" ]; then
14+
npx --offline eslint --version
15+
if [ $? -ne 0 ]; then
1516
echo '::group:: Running `npm install` to install eslint ...'
1617
npm install
1718
echo '::endgroup::'
1819
fi
1920

20-
echo "eslint version:$($(npm bin)/eslint --version)"
21+
echo "eslint version:$(npx --offline eslint --version)"
2122

2223
echo '::group:: Running eslint with reviewdog 🐶 ...'
23-
$(npm bin)/eslint -f="${ESLINT_FORMATTER}" ${INPUT_ESLINT_FLAGS:-'.'} \
24+
npx --offline eslint -f="${ESLINT_FORMATTER}" ${INPUT_ESLINT_FLAGS:-'.'} \
2425
| reviewdog -f=rdjson \
2526
-name="${INPUT_TOOL_NAME}" \
2627
-reporter="${INPUT_REPORTER:-github-pr-review}" \

0 commit comments

Comments
 (0)