Skip to content

Commit f8ecef3

Browse files
format: install and run prettier
1 parent 764bec9 commit f8ecef3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+1912
-1530
lines changed

eslint.config.js

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
1-
import js from '@eslint/js'
2-
import globals from 'globals'
3-
import reactHooks from 'eslint-plugin-react-hooks'
4-
import reactRefresh from 'eslint-plugin-react-refresh'
5-
import tseslint from 'typescript-eslint'
1+
import js from "@eslint/js";
2+
import globals from "globals";
3+
import reactHooks from "eslint-plugin-react-hooks";
4+
import reactRefresh from "eslint-plugin-react-refresh";
5+
import tseslint from "typescript-eslint";
66

77
export default tseslint.config(
8-
{ ignores: ['dist'] },
8+
{ ignores: ["dist"] },
99
{
1010
extends: [js.configs.recommended, ...tseslint.configs.recommended],
11-
files: ['**/*.{ts,tsx}'],
11+
files: ["**/*.{ts,tsx}"],
1212
languageOptions: {
1313
ecmaVersion: 2020,
1414
globals: globals.browser,
1515
},
1616
plugins: {
17-
'react-hooks': reactHooks,
18-
'react-refresh': reactRefresh,
17+
"react-hooks": reactHooks,
18+
"react-refresh": reactRefresh,
1919
},
2020
rules: {
2121
...reactHooks.configs.recommended.rules,
22-
'react-refresh/only-export-components': [
23-
'warn',
22+
"react-refresh/only-export-components": [
23+
"warn",
2424
{ allowConstantExport: true },
2525
],
2626
},
2727
},
28-
)
28+
);

package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"dev": "vite",
88
"build": "tsc -b && vite build",
99
"lint": "eslint .",
10-
"preview": "vite preview"
10+
"preview": "vite preview",
11+
"format": "prettier --write ."
1112
},
1213
"dependencies": {
1314
"fuse.js": "^7.0.0",
@@ -28,6 +29,7 @@
2829
"eslint-plugin-react-hooks": "^5.0.0",
2930
"eslint-plugin-react-refresh": "^0.4.13",
3031
"globals": "^15.11.0",
32+
"prettier": "3.3.3",
3133
"typescript": "~5.6.2",
3234
"typescript-eslint": "^8.10.0",
3335
"vite": "^5.4.10"

pnpm-lock.yaml

+10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/About.tsx

+10-4
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,15 @@ export const AboutSection = () => {
66
<div id="about" className="about-container">
77
<div className="about-text">
88
<h1 className="about-title">About KWoC</h1>
9-
<p className="about-content">Kharagpur Winter of Code is a 5-week long online program for students who are new to open source software development. The program not only helps students to get involved in open source, but also prepares them for many open source summer programs; Google Summer of Code being one of them.</p>
9+
<p className="about-content">
10+
Kharagpur Winter of Code is a 5-week long online program for students
11+
who are new to open source software development. The program not only
12+
helps students to get involved in open source, but also prepares them
13+
for many open source summer programs; Google Summer of Code being one
14+
of them.
15+
</p>
1016
</div>
1117
<img className="about-bottom-image" src={cloudBottom} />
12-
</div >
13-
)
14-
}
18+
</div>
19+
);
20+
};

src/components/DashboardElements.tsx

+59-55
Original file line numberDiff line numberDiff line change
@@ -1,74 +1,78 @@
11
import { Link } from "react-router-dom";
22
import { useAuthContext } from "../util/auth";
33
import "../styles/Profile.css";
4-
import "../styles/Resources.css";
4+
import "../styles/Resources.css";
55

66
export function Profile() {
7-
const authContext = useAuthContext();
8-
return (
9-
<div className="profileContainer">
10-
<img
11-
className="profilePicture"
12-
src={`https://github.com/${authContext.userData.username}.png`}
13-
/>
14-
<h2 className="profileName">
7+
const authContext = useAuthContext();
8+
return (
9+
<div className="profileContainer">
10+
<img
11+
className="profilePicture"
12+
src={`https://github.com/${authContext.userData.username}.png`}
13+
/>
14+
<h2 className="profileName">
1515
{authContext.userData.name}
1616
<br />
1717
<span className="profileUsername">
18-
(@{authContext.userData.username})
18+
(@{authContext.userData.username})
1919
</span>
20-
</h2>
21-
<div className="buttonContainer">
22-
<Link className="editButton" to={authContext.formLink}>
23-
Edit
24-
</Link>
25-
<button className="signOutButton" onClick={authContext.onLogout}>
26-
Sign Out
27-
</button>
28-
</div>
20+
</h2>
21+
<div className="buttonContainer">
22+
<Link className="editButton" to={authContext.formLink}>
23+
Edit
24+
</Link>
25+
<button className="signOutButton" onClick={authContext.onLogout}>
26+
Sign Out
27+
</button>
2928
</div>
30-
);
31-
}
29+
</div>
30+
);
31+
}
3232

3333
interface ResourceItem {
34-
url: string;
35-
avatar: string;
36-
message: string;
37-
noAvatarRounding?: boolean;
34+
url: string;
35+
avatar: string;
36+
message: string;
37+
noAvatarRounding?: boolean;
3838
}
3939

4040
// Define the props for the Resources component
4141
interface ResourcesProps {
42-
title: string;
43-
resources: ResourceItem[];
42+
title: string;
43+
resources: ResourceItem[];
4444
}
4545

4646
export function Resources({ title, resources }: ResourcesProps) {
47-
return (
48-
<div>
49-
<h3 className="resourcesContainer">{title}</h3>
50-
<div className="resourceList">
51-
{resources.map((resource, i) => (
52-
<a
53-
key={i}
54-
target="_blank"
55-
className="resourceLink"
56-
href={resource.url}
57-
rel="noopener noreferrer" // Added for security when linking to external URLs
58-
>
59-
<li className="resourceItem">
60-
<div
61-
className={`avatarWrapper ${
62-
resource.noAvatarRounding ? "noAvatarRounding" : ""
63-
}`}
64-
>
65-
<img src={resource.avatar} className="avatarImage" alt="Avatar" />
66-
</div>
67-
<div className="messageText">{resource.message}</div>
68-
</li>
69-
</a>
70-
))}
71-
</div>
72-
</div>
73-
);
74-
}
47+
return (
48+
<div>
49+
<h3 className="resourcesContainer">{title}</h3>
50+
<div className="resourceList">
51+
{resources.map((resource, i) => (
52+
<a
53+
key={i}
54+
target="_blank"
55+
className="resourceLink"
56+
href={resource.url}
57+
rel="noopener noreferrer" // Added for security when linking to external URLs
58+
>
59+
<li className="resourceItem">
60+
<div
61+
className={`avatarWrapper ${
62+
resource.noAvatarRounding ? "noAvatarRounding" : ""
63+
}`}
64+
>
65+
<img
66+
src={resource.avatar}
67+
className="avatarImage"
68+
alt="Avatar"
69+
/>
70+
</div>
71+
<div className="messageText">{resource.message}</div>
72+
</li>
73+
</a>
74+
))}
75+
</div>
76+
</div>
77+
);
78+
}

src/components/Footer.tsx

+38-11
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
import "../styles/Footer.css";
2-
import { ROUTER_PATHS, DISCORD_INVITE, KOSS_CONTACT_EMAIL, KOSS_LINKEDIN_URL, KOSS_TWITTER_URL, KOSS_WEBSITE_URL } from "../util/constants";
2+
import {
3+
ROUTER_PATHS,
4+
DISCORD_INVITE,
5+
KOSS_CONTACT_EMAIL,
6+
KOSS_LINKEDIN_URL,
7+
KOSS_TWITTER_URL,
8+
KOSS_WEBSITE_URL,
9+
} from "../util/constants";
310

411
const Footer = () => {
512
return (
@@ -8,21 +15,41 @@ const Footer = () => {
815
<div className="footer-columns">
916
<div className="footer-column">
1017
<h2>Social Groups</h2>
11-
<p><a href={DISCORD_INVITE}>Discord</a></p>
12-
<p><a href={KOSS_LINKEDIN_URL}>LinkedIn</a></p>
13-
<p><a href={KOSS_TWITTER_URL}>Twitter</a></p>
18+
<p>
19+
<a href={DISCORD_INVITE}>Discord</a>
20+
</p>
21+
<p>
22+
<a href={KOSS_LINKEDIN_URL}>LinkedIn</a>
23+
</p>
24+
<p>
25+
<a href={KOSS_TWITTER_URL}>Twitter</a>
26+
</p>
1427
</div>
1528
<div className="footer-column">
1629
<h2>Quick Links</h2>
17-
<p><a href={`${ROUTER_PATHS.HOME}#timeline`}>Timeline</a></p>
18-
<p><a href={ROUTER_PATHS.FAQ}>FAQs</a></p>
19-
<p><a href={`${ROUTER_PATHS.HOME}#about`}>About KWoC</a></p>
30+
<p>
31+
<a href={`${ROUTER_PATHS.HOME}#timeline`}>Timeline</a>
32+
</p>
33+
<p>
34+
<a href={ROUTER_PATHS.FAQ}>FAQs</a>
35+
</p>
36+
<p>
37+
<a href={`${ROUTER_PATHS.HOME}#about`}>About KWoC</a>
38+
</p>
2039
</div>
2140
<div className="footer-column">
2241
<h2>Other</h2>
23-
<p><a href={KOSS_WEBSITE_URL}>About KOSS</a></p>
24-
<p><a href="https://kwoc23.kossiitkgp.org/pastprograms">Past Programs</a></p>
25-
<p><a href={KOSS_CONTACT_EMAIL}>[email protected]</a></p>
42+
<p>
43+
<a href={KOSS_WEBSITE_URL}>About KOSS</a>
44+
</p>
45+
<p>
46+
<a href="https://kwoc23.kossiitkgp.org/pastprograms">
47+
Past Programs
48+
</a>
49+
</p>
50+
<p>
51+
<a href={KOSS_CONTACT_EMAIL}>[email protected]</a>
52+
</p>
2653
</div>
2754
</div>
2855
</div>
@@ -34,4 +61,4 @@ const Footer = () => {
3461
);
3562
};
3663

37-
export default Footer
64+
export default Footer;

src/components/Form.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -159,4 +159,4 @@ function FormInput(props: IFormInputProps) {
159159
);
160160
}
161161

162-
export default Form;
162+
export default Form;

src/components/Header.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ export const Header = () => {
66
<div className="header-container">
77
<Navbar />
88
</div>
9-
)
10-
}
9+
);
10+
};

0 commit comments

Comments
 (0)