mirror of
https://github.com/Choices-js/Choices.git
synced 2024-05-03 22:33:12 +02:00
Simplify linting GitHub Action
This commit is contained in:
parent
9835eb756a
commit
c26596e9ec
8
.github/workflows/lint.yml
vendored
8
.github/workflows/lint.yml
vendored
|
@ -20,17 +20,13 @@ jobs:
|
|||
node-version: 12
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm install --no-optional --no-audit --ignore-scripts
|
||||
run: npm ci
|
||||
env:
|
||||
CYPRESS_INSTALL_BINARY: 0
|
||||
HUSKY_SKIP_INSTALL: true
|
||||
|
||||
- name: run eslint
|
||||
run: |
|
||||
CHANGED_TS=$(git --no-pager diff --name-only ..origin/master | grep '^src\/scripts\/.*\.ts$' | xargs ls -d 2>/dev/null | paste -sd " " -)
|
||||
if [[ -z $(sed -e 's/[[:space:]]*$//' <<<${CHANGED_TS}) ]]; then CHANGED_TS="src/scripts"; fi
|
||||
echo $CHANGED_TS
|
||||
node node_modules/eslint/bin/eslint.js $CHANGED_TS
|
||||
run: npm run lint:js
|
||||
|
||||
## Can't use same eslint config for TypeScript and JavaScript
|
||||
## TypeScript rules cause rule definition not found errors
|
||||
|
|
Loading…
Reference in a new issue