From 89e16eb2499f9175624aa0b98d0e88f67fc23959 Mon Sep 17 00:00:00 2001 From: Amit Amrutiya Date: Thu, 25 Jan 2024 22:00:23 +0530 Subject: [PATCH] fix frontend faliure workflow --- .github/workflows/workflow_backend.yml | 7 ++----- .github/workflows/workflow_frontend.yml | 4 ++-- backend/package.json | 3 ++- backend/utils/secToDuration.js | 1 + frontend/package.json | 3 ++- frontend/src/components/common/Footer.jsx | 2 -- package.json | 2 +- 7 files changed, 10 insertions(+), 12 deletions(-) diff --git a/.github/workflows/workflow_backend.yml b/.github/workflows/workflow_backend.yml index 6cf11ed..43829f7 100644 --- a/.github/workflows/workflow_backend.yml +++ b/.github/workflows/workflow_backend.yml @@ -30,11 +30,8 @@ jobs: node-version: '20.x' - name: Install Dependencies - run: npm install --prefix backend + run: npm install - name: Run ESLint - run: cd.. && npm run format - - - name: Run Tests - run: npm test --prefix backend + run: npm run format diff --git a/.github/workflows/workflow_frontend.yml b/.github/workflows/workflow_frontend.yml index c2843a7..58a0f3e 100644 --- a/.github/workflows/workflow_frontend.yml +++ b/.github/workflows/workflow_frontend.yml @@ -31,7 +31,7 @@ jobs: run: npm install --prefix frontend - name: Run ESLint - run: npx eslint . --ext .js,.jsx + run: npm run format - name: Build - run: npm run build \ No newline at end of file + run: npm run build --prefix frontend \ No newline at end of file diff --git a/backend/package.json b/backend/package.json index b9993ce..d431fd6 100644 --- a/backend/package.json +++ b/backend/package.json @@ -8,7 +8,8 @@ "start": "node -r dotenv/config --experimental-json-modules index.js", "dev": "nodemon -r dotenv/config --experimental-json-modules index.js", "test": "jest", - "build": "npm i" + "build": "npm i", + "format": "cd .. && npm run format" }, "keywords": [], "author": "", diff --git a/backend/utils/secToDuration.js b/backend/utils/secToDuration.js index 8e7a818..ebb5d64 100644 --- a/backend/utils/secToDuration.js +++ b/backend/utils/secToDuration.js @@ -1,4 +1,5 @@ // Helper function to convert total seconds to the duration format + export default function convertSecondsToDuration (totalSeconds) { const hours = Math.floor(totalSeconds / 3600) const minutes = Math.floor((totalSeconds % 3600) / 60) diff --git a/frontend/package.json b/frontend/package.json index ebae4b1..72e4431 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -8,7 +8,8 @@ "build": "vite build", "lint": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0", "preview": "vite preview", - "test": "vitest" + "test": "vitest", + "format": "cd .. && npm run format" }, "dependencies": { "@ramonak/react-progress-bar": "^5.0.3", diff --git a/frontend/src/components/common/Footer.jsx b/frontend/src/components/common/Footer.jsx index 7b36ecb..ec4625c 100644 --- a/frontend/src/components/common/Footer.jsx +++ b/frontend/src/components/common/Footer.jsx @@ -1,8 +1,6 @@ import { FooterLink2 } from '../../data/footer-links' import { Link } from 'react-router-dom' -// Images import Logo from '../../assets/Logo/Logo-Full-Light.png' -// Icons import { FaFacebook, FaGoogle, FaTwitter, FaYoutube } from 'react-icons/fa' const BottomFooter = ['Privacy Policy', 'Cookie Policy', 'Terms'] diff --git a/package.json b/package.json index 127ca23..3a79b1a 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "start:server": "cd backend && npm run dev", "start:client": "cd frontend && npm run dev", "dev": "concurrently -n \"server,client\" -c \"red,blue\" \"npm run start:server\" \"npm run start:client\"", - "format": "eslint --fix . && eslint --ext .jsx . --fix" + "format": "npx eslint . --ext .js,.jsx" }, "devDependencies": { "eslint-config-standard": "^17.1.0",