Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add linting workflow to CI #13

Merged
merged 4 commits into from
Feb 20, 2024
Merged
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ client/out/**
client/bundle.js
server/node_modules/**
server/out/**
jest-style-mock.js
jest.config.js
31 changes: 31 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# SPDX-FileCopyrightText: The PFDL VS Code Extension Contributors
# SPDX-License-Identifier: MIT

name: Lint

on:
pull_request:
branches:
- main
push:
marbre marked this conversation as resolved.
Show resolved Hide resolved
branches:
- main

permissions:
contents: read

jobs:
run-lint:
name: Lint check
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Setup Node
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: '18'
- name: Install npm packages
run: npm install
- name: Run ESLint check
run: npm run lint
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@
"postinstall": "cd client && npm install && cd ../server && npm install && cd ..",
"test": "jest client/src/test/*.test.ts",
"test:ci": "jest --config ./jest.config.js --collectCoverage --coverageDirectory=\"./coverage\" --ci --reporters=default --reporters=jest-junit --watchAll=false",
"browserify": "browserify ./client/out/code_visualization/main.js -g browserify-css -o ./client/bundle.js"
"browserify": "browserify ./client/out/code_visualization/main.js -g browserify-css -o ./client/bundle.js",
"lint": "eslint ./"
},
"devDependencies": {
"@types/jest": "^29.5.5",
Expand Down
Loading