Choices/.github/workflows/lint.yml
Konstantin Vyatkin 6848970fd9 improve Babel and webpack configurations --> reduce JS bundle size (#670)
* simplify babel config

* fix Cypress VSCode checks

* introduce webpack base config

* fix flacky cypress test

* fix class properties definition

* fix default export

* upgrade affected deps, decrease bundlesize

* run ESLint only on changed files
2019-10-22 17:08:43 +01:00

32 lines
726 B
YAML

name: Lint
on:
pull_request:
paths:
- 'src/scripts/**'
jobs:
eslint:
name: ESLint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 1
- uses: actions/setup-node@v1
with:
node-version: 10
- name: Install dependencies
run: npm install --no-optional --no-audit --ignore-scripts
env:
CYPRESS_INSTALL_BINARY: 0
HUSKY_SKIP_INSTALL: true
- name: run eslint
run: |
CHANGED_JS=$(git --no-pager diff --name-only ..origin/master | grep '^src\/scripts\/.*\.js$' | grep -v json)
echo $CHANGED_JS
node node_modules/eslint/bin/eslint.js $CHANGED_JS