mirror of
https://github.com/Choices-js/Choices.git
synced 2024-05-15 20:16:39 +02:00
4acd6d6ca8
* run actions on dependencies change * add bundlesize token to master run * fix bundlesize commit number * add cypress env * also run on - '.browserslistrc' changes * update node-sass to allow install on Node 12 and trigger events * use script * add group * skip husky on cypress * upgrade csso dependency to make it trim sourcemaps * fix run-p / run-s use * remove commited assets on check * commit assets * remove cypress record * restore recording * reduce bundlesize limits * try to specify key implicity * remove Cypress recording * restore build in bundlesize * regenerate package-json.lock * commit generated assets * handle no-js case in lint * fix lint error
35 lines
885 B
YAML
35 lines
885 B
YAML
name: Lint
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- 'src/scripts/**'
|
|
- package-lock.json
|
|
- '.browserslistrc'
|
|
|
|
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$' | paste -sd " " -)
|
|
if [[ -z $(sed -e 's/[[:space:]]*$//' <<<${CHANGED_JS}) ]]; then CHANGED_JS="src/scripts"; fi
|
|
echo $CHANGED_JS
|
|
node node_modules/eslint/bin/eslint.js $CHANGED_JS
|