Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linter & husky fixes #25

Merged
merged 1 commit into from
Feb 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions .github/workflows/lint-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,6 @@ on:
- main

jobs:
backend:
name: Backend check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- working-directory: backend
run: |
npm ci
npm run lint-check
env:
PORT: ${{ secrets.PORT }}
MONGODB_URI: ${{ secrets.MONGODB_URI }}
FRONTEND_ORIGIN: ${{ secrets.FRONTEND_ORIGIN }}
EMAIL_USER: ${{ secrets.EMAIL_USER }}
EMAIL_APP_PASSWORD: ${{ secrets.EMAIL_APP_PASSWORD }}
EMAIL_NOTIFICATIONS_RECIPIENT: ${{ secrets.EMAIL_NOTIFICATIONS_RECIPIENT }}
BACKEND_FIREBASE_SETTINGS: ${{ secrets.BACKEND_FIREBASE_SETTINGS }}
SERVICE_ACCOUNT_KEY: ${{ secrets.SERVICE_ACCOUNT_KEY }}

frontend:
name: Frontend check
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .husky/lint-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
enabled=1

# Directories containing JavaScript projects to be linted, separated by spaces.
node_dirs='backend frontend'
node_dirs='frontend'

# Command used to run a lint check.
check_command='npm run lint-check'
Expand Down
23 changes: 17 additions & 6 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@
"eslint-plugin-no-relative-import-paths": "^1.5.3",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
"husky": "^8.0.3",
"eslint-plugin-react-refresh": "^0.4.18",
"husky": "^9.1.7",
"prettier": "^3.4.2",
"typescript": "~5.2.0"
}
Expand Down
4 changes: 3 additions & 1 deletion frontend/src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import type { Metadata } from "next";
import { Inter } from "next/font/google";

import type { Metadata } from "next";

import "@/app/globals.css";
const inter = Inter({ subsets: ["latin"] });
export const metadata: Metadata = {

Check warning on line 7 in frontend/src/app/layout.tsx

View workflow job for this annotation

GitHub Actions / Frontend check

Fast refresh only works when a file only exports components. Use a new file to share constants or functions between components
title: "Create Next App",
description: "Generated by create next app",
};
Expand Down
2 changes: 0 additions & 2 deletions frontend/src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import Image from "next/image";
import styles from "@/app/page.module.css";
export default function Home() {
return (
<main>
Expand Down