diff --git a/.all-contributorsrc b/.all-contributorsrc index 7e2a0c0e..2446d545 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -106,6 +106,16 @@ "code", "doc" ] + }, + { + "login": "daviszung", + "name": "Davis Zung", + "avatar_url": "https://avatars.githubusercontent.com/u/95515224?v=4", + "profile": "https://github.com/daviszung", + "contributions": [ + "code", + "doc" + ] } ], "contributorsPerLine": 7, @@ -113,5 +123,6 @@ "repoType": "github", "repoHost": "https://github.com", "projectName": "internship-tracker", - "projectOwner": "BobaTalks" + "projectOwner": "BobaTalks", + "commitType": "docs" } diff --git a/.github/workflows/lintchecks.yml b/.github/workflows/lintchecks.yml index 8f6a6abf..1a47ba9b 100644 --- a/.github/workflows/lintchecks.yml +++ b/.github/workflows/lintchecks.yml @@ -13,10 +13,10 @@ name: Lint Checks on: push: - branches: [ "main" ] + branches: ["main"] pull_request: # The branches below must be a subset of the branches above - branches: [ "main" ] + branches: ["main"] jobs: eslint: @@ -41,7 +41,7 @@ jobs: --ext .js,.jsx,.ts,.tsx continue-on-error: false - - name: Run Prettier - run: npx prettier client/. - --check - continue-on-error: false + # - name: Run Prettier + # run: npx prettier client/. + # --check + # continue-on-error: false diff --git a/README.md b/README.md index 09bb77b4..36b86ed5 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Internship Tracker -[![All Contributors](https://img.shields.io/badge/all_contributors-10-orange.svg?style=flat-square)](#contributors-) +[![All Contributors](https://img.shields.io/badge/all_contributors-11-orange.svg?style=flat-square)](#contributors-) - [Internship Tracker](#internship-tracker) @@ -78,12 +78,13 @@ Pull requests are built with [deploy previews](https://docs.netlify.com/site-dep Anthony Camarillo
Anthony Camarillo

💻 📖 Brandon C
Brandon C

🎨 DarrenLee09
DarrenLee09

🤔 + Davis Zung
Davis Zung

💻 📖 Jenna Xiao
Jenna Xiao

💻 📖 🐛 Jessica Chen
Jessica Chen

💻 KP
KP

📆 💬 🤔 - Lily Meng
Lily Meng

💻 📖 + Lily Meng
Lily Meng

💻 📖 Razi Syed
Razi Syed

💻 Victoria Tran
Victoria Tran

💼 💬 🤔 📖 📆 leafie8
leafie8

💻 diff --git a/client/.eslintrc.json b/client/.eslintrc.json index 50b74dc5..d1ebd80c 100644 --- a/client/.eslintrc.json +++ b/client/.eslintrc.json @@ -7,17 +7,34 @@ "eslint:recommended", "react-app", "plugin:react/recommended", - "plugin:jsx-a11y/recommended" + "plugin:jsx-a11y/recommended", + "plugin:prettier/recommended", + "prettier" + ], + "ignorePatterns": [ + "node_modules/", + "build/", + "public/" ], - "ignorePatterns": ["node_modules/", "build/", "public/"], "overrides": [], "parserOptions": { "ecmaVersion": "latest", "sourceType": "module" }, - "plugins": ["react", "react-hooks", "prettier"], + "plugins": [ + "react", + "react-hooks", + "simple-import-sort" + ], "rules": { - "prettier/prettier": "error", + "prettier/prettier": [ + "error", + { + "singleQuote": true + } + ], + "simple-import-sort/exports": "error", + "simple-import-sort/imports": "error", "react/prop-types": "off" } } \ No newline at end of file diff --git a/client/package-lock.json b/client/package-lock.json index 35df4b8c..7c711acf 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -27,6 +27,7 @@ "@testing-library/react": "^13.4.0", "@testing-library/user-event": "^13.5.0", "eslint": "^8.32.0", + "eslint-config-prettier": "^8.8.0", "eslint-config-react-app": "^7.0.1", "eslint-config-recommended": "^4.1.0", "eslint-plugin-import": "^2.27.5", @@ -34,6 +35,7 @@ "eslint-plugin-prettier": "^4.2.1", "eslint-plugin-react": "^7.32.1", "eslint-plugin-react-hooks": "^4.6.0", + "eslint-plugin-simple-import-sort": "^10.0.0", "prettier": "2.8.4" } }, @@ -8394,6 +8396,18 @@ "which": "bin/which" } }, + "node_modules/eslint-config-prettier": { + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.8.0.tgz", + "integrity": "sha512-wLbQiFre3tdGgpDv67NQKnJuTlcUVYHas3k+DZCc2U2BadthoEY4B7hLPvAxaqdyOGCzuLfii2fqGph10va7oA==", + "dev": true, + "bin": { + "eslint-config-prettier": "bin/cli.js" + }, + "peerDependencies": { + "eslint": ">=7.0.0" + } + }, "node_modules/eslint-config-react-app": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/eslint-config-react-app/-/eslint-config-react-app-7.0.1.tgz", @@ -9477,6 +9491,15 @@ "semver": "bin/semver.js" } }, + "node_modules/eslint-plugin-simple-import-sort": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-simple-import-sort/-/eslint-plugin-simple-import-sort-10.0.0.tgz", + "integrity": "sha512-AeTvO9UCMSNzIHRkg8S6c3RPy5YEwKWSQPx3DYghLedo2ZQxowPFLGDN1AZ2evfg6r6mjBSZSLxLFsWSu3acsw==", + "dev": true, + "peerDependencies": { + "eslint": ">=5.0.0" + } + }, "node_modules/eslint-plugin-testing-library": { "version": "5.9.1", "resolved": "https://registry.npmjs.org/eslint-plugin-testing-library/-/eslint-plugin-testing-library-5.9.1.tgz", @@ -25717,6 +25740,13 @@ } } }, + "eslint-config-prettier": { + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.8.0.tgz", + "integrity": "sha512-wLbQiFre3tdGgpDv67NQKnJuTlcUVYHas3k+DZCc2U2BadthoEY4B7hLPvAxaqdyOGCzuLfii2fqGph10va7oA==", + "dev": true, + "requires": {} + }, "eslint-config-react-app": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/eslint-config-react-app/-/eslint-config-react-app-7.0.1.tgz", @@ -26524,6 +26554,13 @@ "integrity": "sha512-9aEPf1JEpiTjcFAmmyw8eiIXmcNZOqaZyHO77wgm0/dWfT/oxC1SrIq8ET38pMxHYrcB6Uew+TzUVsBeczF88g==", "dev": true }, + "eslint-plugin-simple-import-sort": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-simple-import-sort/-/eslint-plugin-simple-import-sort-10.0.0.tgz", + "integrity": "sha512-AeTvO9UCMSNzIHRkg8S6c3RPy5YEwKWSQPx3DYghLedo2ZQxowPFLGDN1AZ2evfg6r6mjBSZSLxLFsWSu3acsw==", + "dev": true, + "requires": {} + }, "eslint-plugin-testing-library": { "version": "5.9.1", "resolved": "https://registry.npmjs.org/eslint-plugin-testing-library/-/eslint-plugin-testing-library-5.9.1.tgz", diff --git a/client/package.json b/client/package.json index 5e9c802d..f987671c 100644 --- a/client/package.json +++ b/client/package.json @@ -23,8 +23,8 @@ "build": "react-scripts build", "test": "react-scripts test", "eject": "react-scripts eject", - "lint": "eslint .; prettier . --check", - "lint:fix": "eslint . --fix & prettier . --write" + "lint": "eslint .", + "lint:fix": "eslint . --fix" }, "browserslist": { "production": [ @@ -43,6 +43,7 @@ "@testing-library/react": "^13.4.0", "@testing-library/user-event": "^13.5.0", "eslint": "^8.32.0", + "eslint-config-prettier": "^8.8.0", "eslint-config-react-app": "^7.0.1", "eslint-config-recommended": "^4.1.0", "eslint-plugin-import": "^2.27.5", @@ -50,6 +51,7 @@ "eslint-plugin-prettier": "^4.2.1", "eslint-plugin-react": "^7.32.1", "eslint-plugin-react-hooks": "^4.6.0", + "eslint-plugin-simple-import-sort": "^10.0.0", "prettier": "2.8.4" } } diff --git a/client/src/App.jsx b/client/src/App.jsx index 9f362393..a0c59855 100644 --- a/client/src/App.jsx +++ b/client/src/App.jsx @@ -1,10 +1,11 @@ -import React, { Suspense } from "react"; -import { BrowserRouter, Route, Routes } from "react-router-dom"; -import { CssBaseline, ThemeProvider } from "@mui/material"; -import "@fontsource/poppins"; +import '@fontsource/poppins'; -import theme from "./theme"; -import Loading from "./components/Loading"; +import { CssBaseline, ThemeProvider } from '@mui/material'; +import React, { Suspense } from 'react'; +import { BrowserRouter, Route, Routes } from 'react-router-dom'; + +import Loading from './components/Loading'; +import theme from './theme'; const withSuspense = (Component) => ( }> @@ -12,10 +13,10 @@ const withSuspense = (Component) => ( ); -const HomePage = React.lazy(() => import("./pages/HomePage")); -const SearchResultsPage = React.lazy(() => import("./pages/SearchResultsPage")); -const AboutPage = React.lazy(() => import("./pages/AboutPage")); -const ErrorPage = React.lazy(() => import("./pages/ErrorPage")); +const HomePage = React.lazy(() => import('./pages/HomePage')); +const SearchResultsPage = React.lazy(() => import('./pages/SearchResultsPage')); +const AboutPage = React.lazy(() => import('./pages/AboutPage')); +const ErrorPage = React.lazy(() => import('./pages/ErrorPage')); const App = () => { return ( diff --git a/client/src/components/BackgroundShapes.jsx b/client/src/components/BackgroundShapes.jsx index 35cb97de..ec3afa8e 100644 --- a/client/src/components/BackgroundShapes.jsx +++ b/client/src/components/BackgroundShapes.jsx @@ -1,9 +1,9 @@ -import { useTheme, Box } from "@mui/material"; -import React from "react"; +import { Box, useTheme } from '@mui/material'; +import React from 'react'; -import blobShape from "../assets/milk_tea_blob.svg"; -import circleShape from "../assets/milk_tea_circle.svg"; -import noodleShape from "../assets/milk_tea_noodle.svg"; +import blobShape from '../assets/milk_tea_blob.svg'; +import circleShape from '../assets/milk_tea_circle.svg'; +import noodleShape from '../assets/milk_tea_noodle.svg'; const BackgroundShapes = () => { const theme = useTheme(); @@ -11,23 +11,23 @@ const BackgroundShapes = () => { return ( { { @@ -32,18 +30,18 @@ const BobaCard = ({ @@ -52,9 +50,9 @@ const BobaCard = ({ @@ -63,18 +61,18 @@ const BobaCard = ({ {position} - + @@ -85,11 +83,11 @@ const BobaCard = ({ diff --git a/client/src/components/Filter.jsx b/client/src/components/Filter.jsx index 4061d0fc..822f6483 100644 --- a/client/src/components/Filter.jsx +++ b/client/src/components/Filter.jsx @@ -1,4 +1,4 @@ -import React, { useState, useContext } from "react"; +import { ArrowDropDown, Close } from '@mui/icons-material'; import { Box, Button, @@ -9,9 +9,10 @@ import { FormGroup, Popover, Typography, -} from "@mui/material"; -import { ArrowDropDown, Close } from "@mui/icons-material"; -import FilterContext from "../contexts/FilterContext"; +} from '@mui/material'; +import React, { useContext, useState } from 'react'; + +import FilterContext from '../contexts/FilterContext'; /** * Individual filter component to be used within the FiltersBar. @@ -95,14 +96,14 @@ const Filter = ({ filterLabel }) => { const id = open ? allFilterData[filterLabel].filterName : undefined; const popOverProps = { sx: { - backgroundColor: "grey.main", + backgroundColor: 'grey.main', boxShadow: - "0px 1px 1px rgba(0, 0, 0, 0.14), 0px 1px 2px rgba(0, 0, 0, 0.12), 0px 1px 3px rgba(0, 0, 0, 0.2)", - marginTop: "0.5rem", - borderRadius: "8px", + '0px 1px 1px rgba(0, 0, 0, 0.14), 0px 1px 2px rgba(0, 0, 0, 0.12), 0px 1px 3px rgba(0, 0, 0, 0.2)', + marginTop: '0.5rem', + borderRadius: '8px', }, }; - const cancelButtonLabel = ["Cancel filter", "Reset filter", "Cancel changes"]; + const cancelButtonLabel = ['Cancel filter', 'Reset filter', 'Cancel changes']; return ( <>