mirror of
https://github.com/Choices-js/Choices.git
synced 2024-06-08 00:42:15 +02:00
71e64e0f52
* Update workflow job names
* Update csso-cli
* Add conditional to publish-npm
* 🔖 Version 7.1.2
34 lines
866 B
YAML
34 lines
866 B
YAML
name: Lint
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- 'src/scripts/**'
|
|
- package-lock.json
|
|
- '.browserslistrc'
|
|
|
|
jobs:
|
|
lint:
|
|
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
|