Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 25 additions & 9 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Lint

on:
Expand All @@ -15,15 +12,34 @@ jobs:

strategy:
matrix:
node-version: [16.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
node-version: [18.x]

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

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npx prettier -c "**/*.js"
- run: npx eslint .
cache: "npm"

- name: Clean npm cache and remove node_modules
run: |
rm -rf node_modules package-lock.json
npm cache clean --force

- name: Install dependencies
run: npm install

- name: Verify package-lock.json
run: git diff --exit-code package-lock.json || echo "⚠️ package-lock.json changed, please update it."

- name: Run npm ci
run: npm ci

- name: Run Prettier
run: npx prettier -c "**/*.js"

- name: Run ESLint
run: npx eslint .