ci: add linter check to CI
This commit is contained in:
parent
7dc5646555
commit
5451cfae32
3 changed files with 33 additions and 1 deletions
29
.github/workflows/lint.yml
vendored
Normal file
29
.github/workflows/lint.yml
vendored
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
name: Linter
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
pull_request:
|
||||||
|
branches: '*'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
lint:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Install node
|
||||||
|
uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: 16
|
||||||
|
- name: Cache
|
||||||
|
uses: actions/cache@v2
|
||||||
|
id: cache
|
||||||
|
with:
|
||||||
|
path: '**/node_modules'
|
||||||
|
key: yarn-v1-${{ hashFiles('**/yarn.lock') }}
|
||||||
|
- name: Install
|
||||||
|
run: yarn --immutable
|
||||||
|
if: steps.cache.outputs.cache-hit != 'true'
|
||||||
|
- name: Lint
|
||||||
|
run: yarn lint
|
3
packages/loot-core/.eslintignore
Normal file
3
packages/loot-core/.eslintignore
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
**/node_modules/*
|
||||||
|
**/lib-dist/*
|
||||||
|
**/proto/*
|
|
@ -9,7 +9,7 @@
|
||||||
"build:api": "cross-env NODE_ENV=development webpack --config ./webpack/webpack.api.config.js",
|
"build:api": "cross-env NODE_ENV=development webpack --config ./webpack/webpack.api.config.js",
|
||||||
"build:browser": "NODE_ENV=production ./bin/build-browser",
|
"build:browser": "NODE_ENV=production ./bin/build-browser",
|
||||||
"watch:browser": "NODE_ENV=development ./bin/build-browser",
|
"watch:browser": "NODE_ENV=development ./bin/build-browser",
|
||||||
"lint": "eslint --ignore-pattern '**/node_modules/*' --ignore-pattern '**/lib-dist/*' --ignore-pattern '**/proto/*' src"
|
"lint": "eslint src"
|
||||||
},
|
},
|
||||||
"author": "",
|
"author": "",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
|
|
Loading…
Reference in a new issue