Skip to content

Commit

Permalink
added linting check
Browse files Browse the repository at this point in the history
  • Loading branch information
lolitaroz committed Oct 22, 2024
1 parent 130234c commit 3cf6a99
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
24 changes: 24 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Lint and Format

on: [push, pull_request]

jobs:
lint_and_format:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '16'

- name: Install dependencies
run: npm install
working-directory: ./api

- name: Run Prettier
run: npm run format
working-directory: ./api
5 changes: 4 additions & 1 deletion api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
"build": "tsc",
"start": "node dist/index.js",
"dev": "ts-node-dev --respawn src/index.ts",
"test": "echo \"Error: no test specified\" && exit 1"
"test": "echo \"Error: no test specified\" && exit 1",
"prettier": "prettier --single-quote --write 'src/**/*.{js,ts}'",
"format": "prettier --check"
},
"keywords": [],
"author": "",
Expand All @@ -26,6 +28,7 @@
"@types/express": "^4.17.21",
"@types/node": "^22.5.4",
"@types/uuid": "^10.0.0",
"prettier": "^3.3.3",
"typescript": "^5.6.2"
}
}

0 comments on commit 3cf6a99

Please sign in to comment.