Skip to content

Commit

Permalink
ci: added workflow to run linter
Browse files Browse the repository at this point in the history
  • Loading branch information
tomaspalma committed Sep 16, 2024
1 parent d50ad00 commit c605061
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 3 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/codeanalysis.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Code analysis

on:
push:
branches:
- develop
- main
pull_request:
branches:
- develop
- main

jobs:
lint:
runs-on: ubuntu-latest
name: Lint

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

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3

- name: Cache dependencies
uses: actions/cache@v3
with:
path: |
**/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}

- name: Install dependencies
run: npm install

- name: Build site
run: npm run build

- name: Lint Code
run: npm run lint

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
"scripts": {
"dev": "vite --host",
"build": "tsc && vite build",
"lint": "eslint .",
"preview": "vite preview",
"check": "npx prettier --check .",
"format": "npx prettier --write ."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,6 @@ const ClassSelectorDropdownController = ({
key={`schedule-${classInfo.name}`}
course_id={course.id}
classInfo={classInfo}
displayed={display === classInfo.id}
checked={selectedOption === classInfo.id}
preview={preview}
conflict={timesCollideWithSelected(classInfo)}
onSelect={() => {
setSelectedClassId(classInfo.id)
Expand Down

0 comments on commit c605061

Please sign in to comment.