Skip to content

Commit

Permalink
adding js linting to ci
Browse files Browse the repository at this point in the history
  • Loading branch information
catsmith committed Mar 15, 2024
1 parent 387711f commit 01b4d14
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/ci-eslint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: ci-eslint

on: [push, pull_request]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: "20.10.0"

# Speed up subsequent runs with caching
- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
# install eslint
- name: Install eslint
run: npm i eslint

- name: Install plugin
run: npm i @stylistic/eslint-plugin

# lint the files
- name: Do the linting
run: node_modules/eslint/bin/eslint.js static/api/js/*.js

0 comments on commit 01b4d14

Please sign in to comment.