eslint workflow

This commit is contained in:
Isaac 2021-05-22 13:27:12 +01:00
parent 233957ad6b
commit f58276f603
No known key found for this signature in database
GPG Key ID: F6812DBC6719B4E3
2 changed files with 29 additions and 0 deletions

28
.github/workflows/lint.yml vendored Normal file
View File

@ -0,0 +1,28 @@
name: eslint
on:
- push:
branches:
- master
- pull_request
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- name: Cache pnpm modules
uses: actions/cache@v2
env:
cache-name: cache-pnpm-modules
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}-
- uses: pnpm/action-setup@v2.0.1
with:
version: 6.3.0
run_install: false
- run: pnpm install eslint
- run: pnpm run lint

View File

@ -5,6 +5,7 @@
"description": "An open-source Discord bot for ticket management",
"main": "src/index.js",
"scripts": {
"lint": "eslint src --fix",
"start": "node src/",
"test": "echo \"Nothing to test! Run with 'npm start'\" && exit 1"
},