ci: add linting
This commit is contained in:
1 parent
07cbf4babe
commit
d072f7d712
5 files changed
+47
-5
No files matched your search
@@ -8,7 +8,48 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
|
|
||||||
jobs:
|
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:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
|
|||||||
+2
-1
@@ -8,7 +8,8 @@
|
|||||||
"build": "vite build",
|
"build": "vite build",
|
||||||
"preview": "vite preview",
|
"preview": "vite preview",
|
||||||
"tauri": "tauri",
|
"tauri": "tauri",
|
||||||
"lint": "biome check --apply src/"
|
"lint": "biome check src/",
|
||||||
|
"lint:fix": "biome check --apply src/"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@emotion/react": "^11.11.3",
|
"@emotion/react": "^11.11.3",
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ export const Card = ({
|
|||||||
aspectRatio: cardImageAspectRatios[cardType],
|
aspectRatio: cardImageAspectRatios[cardType],
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<ErrorBoundary fallback=>
|
<ErrorBoundary fallback>
|
||||||
<div
|
<div
|
||||||
className="card-indicator check"
|
className="card-indicator check"
|
||||||
style={{
|
style={{
|
||||||
|
|||||||
@@ -379,7 +379,7 @@ const Hero = ({
|
|||||||
variant="filled"
|
variant="filled"
|
||||||
label={item.OfficialRating ?? "Not Rated"}
|
label={item.OfficialRating ?? "Not Rated"}
|
||||||
/>
|
/>
|
||||||
<ErrorBoundary fallback=>
|
<ErrorBoundary fallback>
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
display: "flex",
|
display: "flex",
|
||||||
|
|||||||
+1
-1
@@ -8,6 +8,7 @@ import { BrowserRouter as Router } from "react-router-dom";
|
|||||||
import App from "./App";
|
import App from "./App";
|
||||||
|
|
||||||
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
|
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
|
||||||
|
import { enqueueSnackbar } from "notistack";
|
||||||
import {
|
import {
|
||||||
delServer,
|
delServer,
|
||||||
getAllServers,
|
getAllServers,
|
||||||
@@ -18,7 +19,6 @@ import {
|
|||||||
import { delUser, getUser } from "./utils/storage/user";
|
import { delUser, getUser } from "./utils/storage/user";
|
||||||
import { createApi, useApi } from "./utils/store/api";
|
import { createApi, useApi } from "./utils/store/api";
|
||||||
import { setInitialRoute } from "./utils/store/central";
|
import { setInitialRoute } from "./utils/store/central";
|
||||||
import { enqueueSnackbar } from "notistack";
|
|
||||||
|
|
||||||
const queryClient = new QueryClient({
|
const queryClient = new QueryClient({
|
||||||
defaultOptions: {
|
defaultOptions: {
|
||||||
|
|||||||
Reference in new issue
Block a user