File tree Expand file tree Collapse file tree 2 files changed +41
-1
lines changed
Expand file tree Collapse file tree 2 files changed +41
-1
lines changed Original file line number Diff line number Diff line change 1+ name : CI
2+
3+ on :
4+ pull_request :
5+ types : [opened, synchronize, reopened]
6+
7+ env :
8+ NODE_VERSION : " 12.x"
9+
10+ jobs :
11+ eslint :
12+ name : Eslint
13+ runs-on : ubuntu-latest
14+ timeout-minutes : 5
15+ steps :
16+ - uses : actions/checkout@v2
17+ with :
18+ fetch-depth : 0
19+
20+ - uses : actions/setup-node@v1
21+ with :
22+ node-version : " ${{ env.NODE_VERSION }}"
23+
24+ - name : Cache node modules
25+ uses : actions/cache@v1
26+ with :
27+ path : node_modules
28+ key : ${{ runner.os }}-node_modules-${{ hashFiles('**/package-lock.json') }}
29+
30+ - name : Install Dependencies
31+ if : steps.cache.outputs.cache-hit != 'true'
32+ run : npm ci
33+
34+ - name : Fetch all branches
35+ run : |
36+ git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/*
37+
38+ - name : ESLint
39+ run : npm run ci:lint -- $(git diff --diff-filter d --name-only origin/${{ github.base_ref }}...HEAD -- '*.js' '*.ts' '*.tsx')
Original file line number Diff line number Diff line change 77 "start" : " parcel index.html --open" ,
88 "build" : " parcel build index.html --no-cache" ,
99 "lint" : " eslint 'src/**/*.js' --quiet --fix" ,
10- "clean" : " rimraf ./dist ./.cache"
10+ "clean" : " rimraf ./dist ./.cache" ,
11+ "ci:lint" : " eslint 'src/**/*.js' -c ./.eslintrc.js"
1112 },
1213 "dependencies" : {
1314 "codemirror" : " 5.53.2" ,
You can’t perform that action at this time.
0 commit comments