Skip to content

Commit

Permalink
ci: add eslint build step (#603)
Browse files Browse the repository at this point in the history
  • Loading branch information
Forceh91 authored Jan 8, 2024
1 parent 59e3ad4 commit 79d5907
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 6 deletions.
23 changes: 22 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,34 @@ jobs:
run: |
yarn install --force --non-interactive
eslint:
name: "eslint"
runs-on: ubuntu-latest
needs: install-cache
steps:
- name: Checkout Commit
uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
- name: Restore yarn dependencies
uses: actions/cache@v3
id: cache-dependencies
with:
path: node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Run linter
run: |
yarn lint
unit-test:
name: "Unit Testing"
runs-on: ubuntu-latest
strategy:
matrix:
node: [18.x, 20.x, 21.x]
needs: install-cache
needs: eslint
steps:
- name: Checkout Commit
uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/pagination.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useEffect, useState } from "react";

export function usePagination(
maxPages: number,
onComplete?: Function,
onComplete?: () => void,
displayLength: number = SCREEN_DEFAULT_DISPLAY_LENGTH
) {
const [page, setPage] = useState(1);
Expand Down
4 changes: 1 addition & 3 deletions src/lib/season/routeHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,14 @@ const historicalData = initializeHistoricalTempPrecip();
const climateNormals = initializeClimateNormals();

export function getSeasonData(req: Request, res: Response) {
const { season, ...seasonPrecipData } = historicalData.seasonPrecipData();

res.json({
season: {
windchill: isWindchillSeason(),
sunspot: isSunSpotSeason(),
winter: getIsWinterSeason(),
},
seasonPrecip: {
...seasonPrecipData,
...historicalData.seasonPrecipData(),
normal: climateNormals.getNormalPrecipForCurrentSeason()?.amount,
},
});
Expand Down
2 changes: 1 addition & 1 deletion src/types/screen.types.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export type AutomaticScreenProps = {
onComplete: Function;
onComplete: () => void;
};

0 comments on commit 79d5907

Please # to comment.