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 step within GitHub Actions workflow #196

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from 3 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
40 changes: 38 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,30 @@ jobs:
run: npx tsc
working-directory: server/

- name: Run tests
run: npm test
working-directory: server/

compile:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [21.x]

steps:
- name: Compile TypeScript files
run: npx tsc
working-directory: server/

start:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [21.x]

steps:
- name: Start index.ts in background
run: npm start &
working-directory: server/
Expand All @@ -48,6 +72,18 @@ jobs:
run: sleep 5 # Adjust sleep time as needed to allow the server to start
timeout-minutes: 1

- name: Run tests
run: npm test
lint:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [21.x]

steps:
- name: Lint server side code
run: npm run lint:fix
working-directory: server/

- name: Lint client side code
run: npm run lint:fix
working-directory: client/
32 changes: 32 additions & 0 deletions client/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
module.exports = {
"env": {
"browser": true,
"es2021": true
},
"extends": [
"standard-with-typescript",
"plugin:react/recommended"
],
"overrides": [
{
"env": {
"node": true
},
"files": [
".eslintrc.{js,cjs}"
],
"parserOptions": {
"sourceType": "script"
}
}
],
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": [
"react"
],
"rules": {
}
}
Loading