ci: add linting

This commit is contained in:
DanCodes committed 2024-01-09 13:18:16 +00:00
1 parent 07cbf4babe
commit d072f7d712
5 files changed
+47 -5

No files matched your search

+42 -1
View File
@@ -8,7 +8,48 @@ on:
pull_request:
jobs:
release:
build_web:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 7
run_install: false
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Sync node version and setup cache
uses: actions/setup-node@v4
with:
node-version: "lts/*"
cache: "pnpm"
- name: Install dependencies
run: pnpm install --no-frozen-lockfile
- name: Lint
run: pnpm run lint
- name: Build
run: pnpm run build
build:
needs: build_web
strategy:
fail-fast: false
matrix:
+2 -1
View File
@@ -8,7 +8,8 @@
"build": "vite build",
"preview": "vite preview",
"tauri": "tauri",
"lint": "biome check --apply src/"
"lint": "biome check src/",
"lint:fix": "biome check --apply src/"
},
"dependencies": {
"@emotion/react": "^11.11.3",
+1 -1
View File
@@ -93,7 +93,7 @@ export const Card = ({
aspectRatio: cardImageAspectRatios[cardType],
}}
>
<ErrorBoundary fallback=>
<ErrorBoundary fallback>
<div
className="card-indicator check"
style={{
+1 -1
View File
@@ -379,7 +379,7 @@ const Hero = ({
variant="filled"
label={item.OfficialRating ?? "Not Rated"}
/>
<ErrorBoundary fallback=>
<ErrorBoundary fallback>
<div
style={{
display: "flex",
+1 -1
View File
@@ -8,6 +8,7 @@ import { BrowserRouter as Router } from "react-router-dom";
import App from "./App";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { enqueueSnackbar } from "notistack";
import {
delServer,
getAllServers,
@@ -18,7 +19,6 @@ import {
import { delUser, getUser } from "./utils/storage/user";
import { createApi, useApi } from "./utils/store/api";
import { setInitialRoute } from "./utils/store/central";
import { enqueueSnackbar } from "notistack";
const queryClient = new QueryClient({
defaultOptions: {