mirror of
https://github.com/HeyPuter/puter
synced 2024-11-15 06:15:47 +00:00
fbda8c8286
Run the ESLint static analysis tool on any code that is submitted, to find possible bugs such as undefined functions and variables. We may want to adjust the ESLint settings over time, but this seems like a good start. This is merged into the previous check-translations.yml action, because that's also a form of linting. Possibly that could be reimplemented as an ESLint plugin.
34 lines
732 B
YAML
34 lines
732 B
YAML
# Lint PRs and pushes to the main branch
|
|
|
|
name: Lint
|
|
|
|
env:
|
|
NODE_VERSION: 21.x
|
|
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
|
|
|
|
on:
|
|
push:
|
|
branches: [ "main" ]
|
|
pull_request:
|
|
branches: [ "main" ]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Use Node.js ${{ env.NODE_VERSION }}
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: ${{ env.NODE_VERSION }}
|
|
cache: 'npm'
|
|
cache-dependency-path: ./package-lock.json
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
- name: Run ESLint
|
|
run: npx eslint
|
|
- name: Check translations
|
|
if: '!cancelled()'
|
|
run: npm run check-translations
|