From ffd5af8e5c5c8363e7d37bd5f4559aa8fc5e098d Mon Sep 17 00:00:00 2001 From: kimatata <117462761+kimatata@users.noreply.github.com> Date: Sat, 26 Jul 2025 14:31:01 +0900 Subject: [PATCH] chore: eslint&format check on workflow (#253) --- .github/workflows/ci.yml | 13 ++++++------- frontend/src/app/[locale]/page.tsx | 7 +++---- package.json | 1 + 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6e3f676..617fe18 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,16 +5,13 @@ on: branches: [ "main", "develop" ] pull_request: branches: [ "main", "develop" ] + workflow_dispatch: jobs: unittcms-test: runs-on: ubuntu-latest - strategy: - matrix: - node-version: [20.x] - steps: - uses: actions/checkout@v4 @@ -26,9 +23,11 @@ jobs: cache: 'npm' - name: Install dependencies run: npm ci - - name: Format code - run: npm run format - - name: Run unit tests + - name: Format check + run: npm run format:check + - name: ESLint check + run: npm run lint + - name: Unit tests run: npm run test # frontend diff --git a/frontend/src/app/[locale]/page.tsx b/frontend/src/app/[locale]/page.tsx index 0102db1..03ba524 100644 --- a/frontend/src/app/[locale]/page.tsx +++ b/frontend/src/app/[locale]/page.tsx @@ -1,13 +1,12 @@ -import { redirect } from 'next/navigation' +import { redirect } from 'next/navigation'; import { PageType } from '@/types/base'; import Config from '@/config/config'; import LandingPage from '@/src/app/[locale]/LandingPage'; export default function Home({ params }: PageType) { - if (!Config.isDemoSite) { - redirect(`/${params.locale}/projects`) + redirect(`/${params.locale}/projects`); } - return + return ; } diff --git a/package.json b/package.json index 2939ab5..83940e3 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,7 @@ "version": "1.0.0", "private": true, "scripts": { + "format:check": "prettier --check frontend/**/*.{js,ts,jsx,tsx,json} backend/**/*.{js,ts,json}", "format": "prettier --write frontend/**/*.{js,ts,jsx,tsx,json} backend/**/*.{js,ts,json}", "test": "vitest", "coverage": "vitest run --coverage",