diff --git a/.github/workflows/workflow_backend.yml b/.github/workflows/workflow_backend.yml index 6cf11ed..8232b79 100644 --- a/.github/workflows/workflow_backend.yml +++ b/.github/workflows/workflow_backend.yml @@ -1,4 +1,4 @@ -name: Node.js CI +name: Backend CI on: push: @@ -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..c13c123 100644 --- a/.github/workflows/workflow_frontend.yml +++ b/.github/workflows/workflow_frontend.yml @@ -15,6 +15,9 @@ jobs: build: runs-on: ubuntu-latest + defaults: + run: + working-directory: ./frontend steps: - uses: actions/checkout@v2 @@ -28,10 +31,10 @@ jobs: node-version: '20.x' - name: Install Dependencies - run: npm install --prefix frontend + run: npm install - 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 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/frontend/src/hooks/useRouteMatch.js b/frontend/src/hooks/useRouteMatch.js index 6185eff..f87ebbe 100644 --- a/frontend/src/hooks/useRouteMatch.js +++ b/frontend/src/hooks/useRouteMatch.js @@ -4,5 +4,4 @@ export default function useRouteMatch (path) { const location = useLocation() return matchPath(location.pathname, { path }) } - // this custom hook check if current location is same as path or not; 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",