Skip to content

Commit

Permalink
add a workflow to lint Node.js
Browse files Browse the repository at this point in the history
  • Loading branch information
fharper committed Aug 14, 2023
1 parent 8875a8d commit 5f64523
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/check-nodejs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
name: Validate Node.js code
on: [push, workflow_dispatch]

jobs:
nodejs-check:
runs-on: ubuntu-latest
steps:

- name: Checkout this repository
uses: actions/checkout@master

- name: Setup Node.js
uses: actions/[email protected]
with:
node-version: v19.6.0
cache: npm

- name: Install ESLint
run: npm install -g eslint

- name: Install ESLint configurations dependencies
run: npm install eslint-config-standard eslint-plugin-import eslint-plugin-n eslint-plugin-promise eslint-formatter-pretty

- name: Download .eslintrc.yml
uses: suisei-cn/[email protected]
with:
url: "https://raw.githubusercontent.com/fharper/gh-configs/main/.eslintrc.yml"

# Rules https://eslint.org/docs/latest/rules/
- name: Run ESLint
run: eslint . --format=pretty --ext .js

0 comments on commit 5f64523

Please sign in to comment.