From df2071439d485bfa5b381ab0187e4621a594186a Mon Sep 17 00:00:00 2001 From: Sahni-Arjun Date: Sun, 6 Mar 2022 21:59:05 -0500 Subject: [PATCH 01/14] changes --- sports-matcher/src/App.js | 2 ++ sports-matcher/src/Navbar.js | 2 +- sports-matcher/src/UserDashboard.js | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/sports-matcher/src/App.js b/sports-matcher/src/App.js index f6ab87b..7fd5faf 100644 --- a/sports-matcher/src/App.js +++ b/sports-matcher/src/App.js @@ -5,6 +5,7 @@ import SignUp from './SignUp'; import Admin from './Admin'; import Home from './Home'; import ChatWindow from './ChatWindow'; +import UserDashboard from './UserDashboard'; function App() { return (
@@ -14,6 +15,7 @@ function App() { } /> } /> } /> + } />
); diff --git a/sports-matcher/src/Navbar.js b/sports-matcher/src/Navbar.js index c9f0fe1..066d57c 100644 --- a/sports-matcher/src/Navbar.js +++ b/sports-matcher/src/Navbar.js @@ -98,7 +98,7 @@ export default function Navbar() { {pages.map((page) => ( - - - +
+ + + + Login + Welcome back! +
+ + E-mail + { + this.setState({ email: e.target.value }); + }} /> + + + Password + { + this.setState({ password: e.target.value }); + }} /> + + +
+
+
+
); } diff --git a/sports-matcher/client/src/pages/Logout.js b/sports-matcher/client/src/pages/Logout.js new file mode 100644 index 0000000..517d95c --- /dev/null +++ b/sports-matcher/client/src/pages/Logout.js @@ -0,0 +1,36 @@ +import React from "react"; +import { useNavigate } from "react-router-dom"; +import { apiClient } from "../utils/httpClients"; + +export default class Logout extends React.Component { + constructor(props) { + super(props); + } + + async componentDidMount() { + const logoutResponse = await apiClient.get("/user/logout"); + let navigation = useNavigate(); + if (logoutResponse.status === 401) { + navigation("/dashboard", { replace: true }); + } else { + this.redirectTimer = setTimeout(() => { + navigation("/", { replace: true }); + }, 2000); + } + } + + async componentWillUnmount() { + clearTimeout(this.redirectTimer); + } + + render() { + return ( +
+
+

You are now logged out. See you later!

+

We will redirect you shortly...

+
+
+ ); + } +} \ No newline at end of file diff --git a/sports-matcher/client/src/utils/routing.js b/sports-matcher/client/src/utils/routing.js index 94c328e..46caad9 100644 --- a/sports-matcher/client/src/utils/routing.js +++ b/sports-matcher/client/src/utils/routing.js @@ -1,7 +1,6 @@ -import { useNavigate } from "react-router-dom"; import { apiClient } from "./httpClients"; -export function guard(evaluator, redirect, navigateOptions, onRedirect) { +export function guard(navigator, evaluator, redirect, navigateOptions, onRedirect) { if (!evaluator) throw new Error("evaluator required."); if (!redirect) throw new Error("redirect required."); if (!navigateOptions) { @@ -9,16 +8,15 @@ export function guard(evaluator, redirect, navigateOptions, onRedirect) { replace: true }; } - let navigate = useNavigate(); let redirecting = !evaluator(); if (redirecting) { if (onRedirect) onRedirect(); - navigate(redirect, navigateOptions); + navigator(redirect, navigateOptions); } } -export async function needUser() { +export async function needUser(navigator) { let userDataResponse = await apiClient.get("/user"); - guard(() => userDataResponse.status === 200, "/login"); + guard(navigator, () => userDataResponse.status === 200, "/login"); return userDataResponse.data; } \ No newline at end of file From 8f46ad77b8c5aab43228124c852da619f66e5867 Mon Sep 17 00:00:00 2001 From: Piyush Sharma Date: Tue, 5 Apr 2022 20:17:50 -0400 Subject: [PATCH 06/14] Added cards and scroll styling --- .../src/components/MatchInfoCardDisplay.js | 2 +- .../client/src/components/SportInfoCard.js | 26 +++++++++ .../src/components/SportInfoCardDisplay.js | 24 +++++++++ sports-matcher/client/src/pages/Dashboard.js | 53 +++++++++++-------- .../src/styles/MatchInfoCardDisplay.css | 4 ++ 5 files changed, 85 insertions(+), 24 deletions(-) create mode 100644 sports-matcher/client/src/components/SportInfoCard.js create mode 100644 sports-matcher/client/src/components/SportInfoCardDisplay.js create mode 100644 sports-matcher/client/src/styles/MatchInfoCardDisplay.css diff --git a/sports-matcher/client/src/components/MatchInfoCardDisplay.js b/sports-matcher/client/src/components/MatchInfoCardDisplay.js index 3dd3f7b..cb19099 100644 --- a/sports-matcher/client/src/components/MatchInfoCardDisplay.js +++ b/sports-matcher/client/src/components/MatchInfoCardDisplay.js @@ -1,7 +1,7 @@ import React from "react"; import propTypes from "prop-types"; import MatchInfoCard from "./MatchInfoCard"; - +import "../styles/MatchInfoCardDisplay.css"; export default class MatchInfoCardDisplay extends React.Component { constructor(props) { super(props); diff --git a/sports-matcher/client/src/components/SportInfoCard.js b/sports-matcher/client/src/components/SportInfoCard.js new file mode 100644 index 0000000..5995d4d --- /dev/null +++ b/sports-matcher/client/src/components/SportInfoCard.js @@ -0,0 +1,26 @@ +import React from "react"; +import { Card } from "react-bootstrap"; +import propTypes from "prop-types"; +export default class SportInfoCard extends React.Component { + constructor(props) { + super(props); + } + + render() { + return ( + + + {this.props.sport.name} + {this.props.sport.minPlayers.toString()} + +

{this.props.sport.description}

+
+
+
+ ); + } +} + +SportInfoCard.propTypes = { + sport: propTypes.object, +}; \ No newline at end of file diff --git a/sports-matcher/client/src/components/SportInfoCardDisplay.js b/sports-matcher/client/src/components/SportInfoCardDisplay.js new file mode 100644 index 0000000..649572f --- /dev/null +++ b/sports-matcher/client/src/components/SportInfoCardDisplay.js @@ -0,0 +1,24 @@ +import React from "react"; +import propTypes from "prop-types"; +import SportInfoCard from "./SportInfoCard"; +import "../styles/MatchInfoCardDisplay.css"; +export default class SportInfoCardDisplay extends React.Component { + constructor(props) { + super(props); + } + render() { + let sports = null; + if(this.props.recommendedsports && this.props.recommendedsports.length > 0) { + sports = this.props.recommendedsports.map((sport) => ); + } + return ( +
+ {sports} +
+ ); + } +} + +SportInfoCardDisplay.propTypes = { + recommendedsports: propTypes.array, +}; \ No newline at end of file diff --git a/sports-matcher/client/src/pages/Dashboard.js b/sports-matcher/client/src/pages/Dashboard.js index 0d6b3a6..f3689ca 100644 --- a/sports-matcher/client/src/pages/Dashboard.js +++ b/sports-matcher/client/src/pages/Dashboard.js @@ -3,7 +3,8 @@ import { Button, InputGroup, FormControl } from "react-bootstrap"; import "../styles/Dashboard.css"; import { apiClient } from "../utils/httpClients.js"; import MatchInfoCardDisplay from "../components/MatchInfoCardDisplay"; -import { needUser } from "../utils/routing.js"; +import SportInfoCardDisplay from "../components/SportInfoCardDisplay"; +// import { needUser } from "../utils/routing.js"; export default class Dashboard extends React.Component { constructor(props) { super(props); @@ -13,11 +14,16 @@ export default class Dashboard extends React.Component { displayedEquipment: [], user: null }; - this.getFirstName(); + // this.getFirstName(); } + // async componentDidMount() { + // this.setState({ user: await needUser() }); // needUser says this page needs a user, and therefore, if there isn't a user, get them to login first. It returns the authenticated user. + // this.setState({ displayedMatches: await this.latestMatches() }); + // } async componentDidMount() { - this.setState({ user: await needUser() }); // needUser says this page needs a user, and therefore, if there isn't a user, get them to login first. It returns the authenticated user. - this.setState({ displayedMatches: await this.latestMatches() }); + await this.latestMatches(); + await this.availableSports(); + // await this.availableEquipment(); } async latestMatches() { let recentMatchesRes = await apiClient.get("/match/recent/15"); @@ -26,26 +32,26 @@ export default class Dashboard extends React.Component { } } - async availableMatches() { - let availableMatchesRes = await apiClient.get("/sports"); - if (availableMatchesRes.status === 200) { - this.setState({ displayedSports: availableMatchesRes.data.recent }); + async availableSports() { + let availableSportsRes = await apiClient.get("/sport"); + if (availableSportsRes.status === 200) { + this.setState({ displayedSports: availableSportsRes.data.recent }); } } - async availableEquipment() { - let availableEquipmentRes = await apiClient.get("/rentals"); - if (availableEquipmentRes.status === 200) { - this.setState({ displayedEquipment: availableEquipmentRes.data.recent }); - } - } + // async availableEquipment() { + // let availableEquipmentRes = await apiClient.get("/rentals"); + // if (availableEquipmentRes.status === 200) { + // this.setState({ displayedEquipment: availableEquipmentRes.data.recent }); + // } + // } - async getFirstName() { - // let result = await apiClient.post("/user/login", {"email": "johndoe@gmail.com", "password": "csc309h1"}).then(apiClient.get("/user")); - let user = await apiClient.get("/user"); - let tags = document.getElementsByTagName("h1"); - tags[0].innerHTML = user.firstName; - } + // async getFirstName() { + // // let result = await apiClient.post("/user/login", {"email": "johndoe@gmail.com", "password": "csc309h1"}).then(apiClient.get("/user")); + // let user = await apiClient.get("/user"); + // let tags = document.getElementsByTagName("h1"); + // tags[0].innerHTML = user.firstName; + // } render() { return ( @@ -66,12 +72,13 @@ export default class Dashboard extends React.Component {

Available Sports

- +
-
+ {/*

Available Equipment

-
+
*/} +
); } diff --git a/sports-matcher/client/src/styles/MatchInfoCardDisplay.css b/sports-matcher/client/src/styles/MatchInfoCardDisplay.css new file mode 100644 index 0000000..d6f7190 --- /dev/null +++ b/sports-matcher/client/src/styles/MatchInfoCardDisplay.css @@ -0,0 +1,4 @@ +.horizontal-scroller{ + display: flex; + overflow-x: auto; +} \ No newline at end of file From 999f8846942eacd1647e79c60ce462dbf02d6682 Mon Sep 17 00:00:00 2001 From: Harrison Deng Date: Tue, 5 Apr 2022 19:51:13 -0500 Subject: [PATCH 07/14] Login now displays an error message on a failed login. --- sports-matcher/client/src/pages/Login.js | 27 ++++++++++++++++--- .../client/src/utils/httpClients.js | 8 +++--- 2 files changed, 26 insertions(+), 9 deletions(-) diff --git a/sports-matcher/client/src/pages/Login.js b/sports-matcher/client/src/pages/Login.js index a7f5793..526852e 100644 --- a/sports-matcher/client/src/pages/Login.js +++ b/sports-matcher/client/src/pages/Login.js @@ -1,5 +1,5 @@ import React from "react"; -import { Button, Card, Container, Form } from "react-bootstrap"; +import { Alert, Button, Card, Container, Form } from "react-bootstrap"; import { globalContext } from "../context"; import { apiClient } from "../utils/httpClients"; import { guard } from "../utils/routing"; @@ -9,7 +9,8 @@ export default class Login extends React.Component { super(props); this.state = { email: "", - password: "" + password: "", + errorDisplayed: false, }; this.attemptLogin = this.attemptLogin.bind(this); @@ -33,18 +34,36 @@ export default class Login extends React.Component { const loginResponse = await apiClient.post("/user/login", { email: this.state.email, password: this.state.password, + }, { + validateStatus: function (status) { + return status === 200 || status === 401 || status === 400; + } }); - if (loginResponse.status === 200) { this.context.navigate("/dashboard", { replace: true }); + } else if (loginResponse.status === 401) { + this.setState({ errorDisplayed: true }); } } render() { + let errorMsg = ( +
+ ); + if (this.state.errorDisplayed) { + errorMsg = ( + < Alert variant="danger" onClose={() => this.setState({ errorDisplayed: false })} dismissible > + Incorrect credentials +

Double check your provided e-mail and password!

+ + ); + } + return (
- + {errorMsg} + Login diff --git a/sports-matcher/client/src/utils/httpClients.js b/sports-matcher/client/src/utils/httpClients.js index 1e8231e..95af7d7 100644 --- a/sports-matcher/client/src/utils/httpClients.js +++ b/sports-matcher/client/src/utils/httpClients.js @@ -1,9 +1,7 @@ import axios from "axios"; -const apiClientConf = { +export const apiClient = axios.create({ baseURL: process.env.REACT_APP_API_HOST + "/api/", timeout: 5000, - withCredentials: process.env.NODE_ENV === "development" -}; -console.log(apiClientConf); -export const apiClient = axios.create(apiClientConf); \ No newline at end of file + withCredentials: process.env.NODE_ENV === "development", +}); \ No newline at end of file From 6cd421ba01f644c668a0fc64338e9ab84296b101 Mon Sep 17 00:00:00 2001 From: Harrison Deng Date: Tue, 5 Apr 2022 20:13:55 -0500 Subject: [PATCH 08/14] Fixed sport display. --- .../src/components/SportInfoCardDisplay.js | 2 +- sports-matcher/client/src/pages/Dashboard.js | 28 ++----------------- 2 files changed, 4 insertions(+), 26 deletions(-) diff --git a/sports-matcher/client/src/components/SportInfoCardDisplay.js b/sports-matcher/client/src/components/SportInfoCardDisplay.js index 649572f..c50e71d 100644 --- a/sports-matcher/client/src/components/SportInfoCardDisplay.js +++ b/sports-matcher/client/src/components/SportInfoCardDisplay.js @@ -8,7 +8,7 @@ export default class SportInfoCardDisplay extends React.Component { } render() { let sports = null; - if(this.props.recommendedsports && this.props.recommendedsports.length > 0) { + if (this.props.recommendedsports.length > 0) { sports = this.props.recommendedsports.map((sport) => ); } return ( diff --git a/sports-matcher/client/src/pages/Dashboard.js b/sports-matcher/client/src/pages/Dashboard.js index f3689ca..e400a1b 100644 --- a/sports-matcher/client/src/pages/Dashboard.js +++ b/sports-matcher/client/src/pages/Dashboard.js @@ -4,7 +4,6 @@ import "../styles/Dashboard.css"; import { apiClient } from "../utils/httpClients.js"; import MatchInfoCardDisplay from "../components/MatchInfoCardDisplay"; import SportInfoCardDisplay from "../components/SportInfoCardDisplay"; -// import { needUser } from "../utils/routing.js"; export default class Dashboard extends React.Component { constructor(props) { super(props); @@ -14,16 +13,11 @@ export default class Dashboard extends React.Component { displayedEquipment: [], user: null }; - // this.getFirstName(); } - // async componentDidMount() { - // this.setState({ user: await needUser() }); // needUser says this page needs a user, and therefore, if there isn't a user, get them to login first. It returns the authenticated user. - // this.setState({ displayedMatches: await this.latestMatches() }); - // } + async componentDidMount() { await this.latestMatches(); await this.availableSports(); - // await this.availableEquipment(); } async latestMatches() { let recentMatchesRes = await apiClient.get("/match/recent/15"); @@ -35,23 +29,10 @@ export default class Dashboard extends React.Component { async availableSports() { let availableSportsRes = await apiClient.get("/sport"); if (availableSportsRes.status === 200) { - this.setState({ displayedSports: availableSportsRes.data.recent }); + this.setState({ displayedSports: availableSportsRes.data }); } } - // async availableEquipment() { - // let availableEquipmentRes = await apiClient.get("/rentals"); - // if (availableEquipmentRes.status === 200) { - // this.setState({ displayedEquipment: availableEquipmentRes.data.recent }); - // } - // } - - // async getFirstName() { - // // let result = await apiClient.post("/user/login", {"email": "johndoe@gmail.com", "password": "csc309h1"}).then(apiClient.get("/user")); - // let user = await apiClient.get("/user"); - // let tags = document.getElementsByTagName("h1"); - // tags[0].innerHTML = user.firstName; - // } render() { return ( @@ -74,10 +55,7 @@ export default class Dashboard extends React.Component {

Available Sports

- {/*
-

Available Equipment

- -
*/} + ); From 559973de5ac76fb882016202b33e4b5ffdc3e32d Mon Sep 17 00:00:00 2001 From: Hansi Xu Date: Tue, 5 Apr 2022 21:15:39 -0400 Subject: [PATCH 09/14] Create signup.js --- .../client/src/components/SIgnup.js | 82 +++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 sports-matcher/client/src/components/SIgnup.js diff --git a/sports-matcher/client/src/components/SIgnup.js b/sports-matcher/client/src/components/SIgnup.js new file mode 100644 index 0000000..08a6cac --- /dev/null +++ b/sports-matcher/client/src/components/SIgnup.js @@ -0,0 +1,82 @@ +import React from "react"; +import { Button, Card, Form } from "react-bootstrap"; +import { apiClient } from "../utils/httpClients"; +import { guard } from "../utils/routing"; + +export default class Signup extends React.Component { + constructor(props) { + super(props); + this.state = { + user: null, + alertShow: false, + alertKey: null, + alertMsg: null + } + this.state.user = { + email: null, + firstName: null, + lastName: null, + phone: null, + password: null + } + } + + async registerUser() { + const registerResponse = await apiClient.post("/user", this.state); + if (registerResponse.status === 200) { + this.warnUser() + } + } + + setUserState(event) { + newUser = this.state.user; + newUser[event.target.controlId] = event.target.value + this.setState({user: newUser}) + } + + warnUser(msg, key) { + this.setState({alertMsg: msg}) + this.setState({show: true}) + } + + render() { + return ( +
+ + {this.state.alertMsg} + + + + Login + Welcome to Sports Matcher! +
+ + First name + + + + Last name + + + + E-mail + + + + Phone number + + + + Password + + + +
+
+
+
+ ); + } +} From d86570996e10c13f591e995902d5a0c06d481b25 Mon Sep 17 00:00:00 2001 From: Hansi Xu Date: Tue, 5 Apr 2022 21:39:48 -0400 Subject: [PATCH 10/14] updating the signup page --- sports-matcher/client/src/components/SIgnup.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/sports-matcher/client/src/components/SIgnup.js b/sports-matcher/client/src/components/SIgnup.js index 08a6cac..c603579 100644 --- a/sports-matcher/client/src/components/SIgnup.js +++ b/sports-matcher/client/src/components/SIgnup.js @@ -22,9 +22,15 @@ export default class Signup extends React.Component { } async registerUser() { - const registerResponse = await apiClient.post("/user", this.state); - if (registerResponse.status === 200) { - this.warnUser() + const res = await apiClient.post("/user", this.state); + if (res.status === 200) { + this.warnUser("You are successfully signed up!", "success") + } else if (res === 409) { + this.warnUser("This user already exists. Try logging in instead.", "danger") + } else if (res === 400) { + this.warnUser("Missing required fields.", "danger") + } else { + this.warnUser("Internal server error. Please try again later.", "danger") } } From 5a49a1e4f8a5d12bb929ed36c623a1ab27652244 Mon Sep 17 00:00:00 2001 From: Hansi Xu Date: Tue, 5 Apr 2022 21:48:08 -0400 Subject: [PATCH 11/14] Moved signup to pages --- sports-matcher/client/src/{components => pages}/SIgnup.js | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sports-matcher/client/src/{components => pages}/SIgnup.js (100%) diff --git a/sports-matcher/client/src/components/SIgnup.js b/sports-matcher/client/src/pages/SIgnup.js similarity index 100% rename from sports-matcher/client/src/components/SIgnup.js rename to sports-matcher/client/src/pages/SIgnup.js From 34bbfb3d5de87389dee02bc36478d5d539628ab2 Mon Sep 17 00:00:00 2001 From: Harrison Deng Date: Tue, 5 Apr 2022 20:54:26 -0500 Subject: [PATCH 12/14] Final changes. --- sports-matcher/client/src/components/SportInfoCard.js | 2 +- sports-matcher/client/src/pages/Dashboard.js | 6 ++++++ sports-matcher/client/src/utils/httpClients.js | 5 ++++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/sports-matcher/client/src/components/SportInfoCard.js b/sports-matcher/client/src/components/SportInfoCard.js index 5995d4d..14477e9 100644 --- a/sports-matcher/client/src/components/SportInfoCard.js +++ b/sports-matcher/client/src/components/SportInfoCard.js @@ -13,7 +13,7 @@ export default class SportInfoCard extends React.Component { {this.props.sport.name} {this.props.sport.minPlayers.toString()} -

{this.props.sport.description}

+ {this.props.sport.description}
diff --git a/sports-matcher/client/src/pages/Dashboard.js b/sports-matcher/client/src/pages/Dashboard.js index e400a1b..a8370a0 100644 --- a/sports-matcher/client/src/pages/Dashboard.js +++ b/sports-matcher/client/src/pages/Dashboard.js @@ -4,6 +4,9 @@ import "../styles/Dashboard.css"; import { apiClient } from "../utils/httpClients.js"; import MatchInfoCardDisplay from "../components/MatchInfoCardDisplay"; import SportInfoCardDisplay from "../components/SportInfoCardDisplay"; +import { globalContext } from "../context"; +import { needUser } from "../utils/routing"; + export default class Dashboard extends React.Component { constructor(props) { super(props); @@ -15,7 +18,10 @@ export default class Dashboard extends React.Component { }; } + static contextType = globalContext; + async componentDidMount() { + await needUser(this.context.navigate); await this.latestMatches(); await this.availableSports(); } diff --git a/sports-matcher/client/src/utils/httpClients.js b/sports-matcher/client/src/utils/httpClients.js index 95af7d7..6cff00c 100644 --- a/sports-matcher/client/src/utils/httpClients.js +++ b/sports-matcher/client/src/utils/httpClients.js @@ -1,7 +1,10 @@ import axios from "axios"; export const apiClient = axios.create({ - baseURL: process.env.REACT_APP_API_HOST + "/api/", + baseURL: process.env.REACT_APP_API_HOST || "" + "/api/", timeout: 5000, withCredentials: process.env.NODE_ENV === "development", + validateStatus: function (status) { + return status === 401 || status == 200; + } }); \ No newline at end of file From 499cbf3409c89e23d249ff8f724ea710f45dbdf4 Mon Sep 17 00:00:00 2001 From: Harrison Deng Date: Wed, 6 Apr 2022 20:35:41 -0500 Subject: [PATCH 13/14] Fixed api client url error. --- sports-matcher/client/src/utils/httpClients.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sports-matcher/client/src/utils/httpClients.js b/sports-matcher/client/src/utils/httpClients.js index 6cff00c..36a9ea2 100644 --- a/sports-matcher/client/src/utils/httpClients.js +++ b/sports-matcher/client/src/utils/httpClients.js @@ -1,7 +1,7 @@ import axios from "axios"; export const apiClient = axios.create({ - baseURL: process.env.REACT_APP_API_HOST || "" + "/api/", + baseURL: (process.env.REACT_APP_API_HOST || "") + "/api/", timeout: 5000, withCredentials: process.env.NODE_ENV === "development", validateStatus: function (status) { From c738e8044a2afb3283c3a375c354613f8c1f91f7 Mon Sep 17 00:00:00 2001 From: Harrison Deng Date: Wed, 6 Apr 2022 21:03:30 -0500 Subject: [PATCH 14/14] eslint no fails compiles due to unused imports. --- sports-matcher/client/.eslintrc.json | 3 ++- sports-matcher/server/.eslintrc.json | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/sports-matcher/client/.eslintrc.json b/sports-matcher/client/.eslintrc.json index 3cdde28..456e459 100644 --- a/sports-matcher/client/.eslintrc.json +++ b/sports-matcher/client/.eslintrc.json @@ -35,6 +35,7 @@ "semi": [ "error", "always" - ] + ], + "no-unused-vars": "warn" } } \ No newline at end of file diff --git a/sports-matcher/server/.eslintrc.json b/sports-matcher/server/.eslintrc.json index 0806fb5..e296e45 100644 --- a/sports-matcher/server/.eslintrc.json +++ b/sports-matcher/server/.eslintrc.json @@ -14,7 +14,7 @@ 4 ], "linebreak-style": [ - "error", + "warn", "unix" ], "quotes": [ @@ -24,6 +24,7 @@ "semi": [ "error", "always" - ] + ], + "no-unused-vars": "warn" } } \ No newline at end of file