Skip to content

Commit

Permalink
Merge pull request #819 from bounswe/frontend/remove-imports
Browse files Browse the repository at this point in the history
other eslint rules are changed
  • Loading branch information
AliBasarann authored Nov 22, 2023
2 parents 8483fed + a04f94d commit 8d5ca42
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 9 deletions.
3 changes: 3 additions & 0 deletions app/frontend/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,8 @@ module.exports = {
{ allowConstantExport: true },
],
"@typescript-eslint/no-unused-vars": "warn", // or 'off' to completely ignore unused variables
"@typescript-eslint/no-explicit-any": "warn", // Changes error to a warning for 'no-explicit-any'
"no-useless-catch": "warn", // Changes error to a warning for 'no-useless-catch'
"@typescript-eslint/no-non-null-asserted-optional-chain": "warn",
},
};
5 changes: 2 additions & 3 deletions app/frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@ FROM node:18

WORKDIR /frontend

COPY package.json pnpm-lock.yaml ./

COPY . ./

RUN npm install -g pnpm && \
pnpm install

COPY . ./

RUN pnpm build

EXPOSE 5173
Expand Down
4 changes: 2 additions & 2 deletions app/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"build": "vite build",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives",
"preview": "vite preview"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion app/frontend/src/Components/Comment/Reply/Reply.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { formatDate } from "../../../Library/utils/formatDate";
import styles from "./reply.module.scss";
import styles from "./Reply.module.scss";
import { DeleteOutlined, DownOutlined, UpOutlined } from "@ant-design/icons";
import { useVote } from "../../Hooks/useVote";
import { Button } from "antd";
Expand Down
2 changes: 1 addition & 1 deletion app/frontend/src/Components/Groups/PrivateGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function PrivateGroup({ group }: { group: any }) {
</div>
<div style={{ display: "flex", gap: "3px" }}>
<Button>Apply</Button>
<Button onClick={() => navigate(`/group/${group.id}`)}>
<Button onClick={() => navigate(`/group/detail/${group.id}`)}>
Group Details
</Button>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/frontend/src/Components/Groups/PublicGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ function PublicGroup({ group }: { group: any }) {
</div>
<div style={{ display: "flex", gap: "3px" }}>
<Button>Join</Button>
<Button onClick={() => navigate(`/group/${group.id}`)}>
<Button onClick={() => navigate(`/group/detail/${group.id}`)}>
Group Details
</Button>
</div>
Expand Down
3 changes: 2 additions & 1 deletion app/frontend/src/Components/Hooks/useAuth.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import axios from "axios";
import Cookies from "js-cookie";
import {
PropsWithChildren,
ReactNode,
createContext,
useContext,
useEffect,
Expand Down Expand Up @@ -53,7 +54,7 @@ const useAuth = (): UseAuthProps => {
};

// AuthProvider component
const AuthProvider = ({ children }: PropsWithChildren<{}>) => {
const AuthProvider = ({ children }: { children?: ReactNode }) => {
const [user, setUser] = useState<User | null>(null); // Initialize to fetch from local storage or server if needed

useEffect(() => {
Expand Down

0 comments on commit 8d5ca42

Please sign in to comment.