Skip to content

Commit

Permalink
chore: Add linting in CI/CD pipeline (#665)
Browse files Browse the repository at this point in the history
Add lint workflow in GitHub Actions pipeline

Co-authored-by: Melvin. L. Abraham <[email protected]>
  • Loading branch information
nikosavola and Melvin-Abraham authored Mar 25, 2022
1 parent e5499d5 commit 1bb0acb
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"ecmaVersion": 12
},
"ignorePatterns": [
"*.min.js"
"*.min.js",
"**/lib/pv_workers/*.js"
],
"rules": {
"linebreak-style": "off",
Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,27 @@ jobs:

- name: Build
run: npm run dist:ci

lint:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Set up Node.js environment
uses: actions/setup-node@v2
with:
node-version: 12.x

- name: Cache Dependencies
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ matrix.os }}-node-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }}

- name: Install Dependencies
run: npm ci

- name: Run ESLint
run: npm run lint

0 comments on commit 1bb0acb

Please sign in to comment.