Skip to content

Commit 034927c

Browse files
committed
Change prettier rule + tighter TS type
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
1 parent 28bc75b commit 034927c

File tree

5 files changed

+15
-24
lines changed

5 files changed

+15
-24
lines changed

.prettierrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@
33
"tabWidth": 2,
44
"useTabs": false,
55
"semi": true,
6-
"singleQuote": true
6+
"singleQuote": true,
7+
"jsxBracketSameLine": true
78
}

src/components/MemberCard.tsx

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,7 @@ const MemberCard = ({
3939
xmlns="http://www.w3.org/2000/svg"
4040
width="24"
4141
height="24"
42-
viewBox="0 0 24 24"
43-
>
42+
viewBox="0 0 24 24">
4443
<path d="M12 0c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm1 16.057v-3.057h2.994c-.059 1.143-.212 2.24-.456 3.279-.823-.12-1.674-.188-2.538-.222zm1.957 2.162c-.499 1.33-1.159 2.497-1.957 3.456v-3.62c.666.028 1.319.081 1.957.164zm-1.957-7.219v-3.015c.868-.034 1.721-.103 2.548-.224.238 1.027.389 2.111.446 3.239h-2.994zm0-5.014v-3.661c.806.969 1.471 2.15 1.971 3.496-.642.084-1.3.137-1.971.165zm2.703-3.267c1.237.496 2.354 1.228 3.29 2.146-.642.234-1.311.442-2.019.607-.344-.992-.775-1.91-1.271-2.753zm-7.241 13.56c-.244-1.039-.398-2.136-.456-3.279h2.994v3.057c-.865.034-1.714.102-2.538.222zm2.538 1.776v3.62c-.798-.959-1.458-2.126-1.957-3.456.638-.083 1.291-.136 1.957-.164zm-2.994-7.055c.057-1.128.207-2.212.446-3.239.827.121 1.68.19 2.548.224v3.015h-2.994zm1.024-5.179c.5-1.346 1.165-2.527 1.97-3.496v3.661c-.671-.028-1.329-.081-1.97-.165zm-2.005-.35c-.708-.165-1.377-.373-2.018-.607.937-.918 2.053-1.65 3.29-2.146-.496.844-.927 1.762-1.272 2.753zm-.549 1.918c-.264 1.151-.434 2.36-.492 3.611h-3.933c.165-1.658.739-3.197 1.617-4.518.88.361 1.816.67 2.808.907zm.009 9.262c-.988.236-1.92.542-2.797.9-.89-1.328-1.471-2.879-1.637-4.551h3.934c.058 1.265.231 2.488.5 3.651zm.553 1.917c.342.976.768 1.881 1.257 2.712-1.223-.49-2.326-1.211-3.256-2.115.636-.229 1.299-.435 1.999-.597zm9.924 0c.7.163 1.362.367 1.999.597-.931.903-2.034 1.625-3.257 2.116.489-.832.915-1.737 1.258-2.713zm.553-1.917c.27-1.163.442-2.386.501-3.651h3.934c-.167 1.672-.748 3.223-1.638 4.551-.877-.358-1.81-.664-2.797-.9zm.501-5.651c-.058-1.251-.229-2.46-.492-3.611.992-.237 1.929-.546 2.809-.907.877 1.321 1.451 2.86 1.616 4.518h-3.933z" />
4544
</svg>
4645
</a>
@@ -58,8 +57,7 @@ const MemberCard = ({
5857
xmlns="http://www.w3.org/2000/svg"
5958
width="24"
6059
height="24"
61-
viewBox="0 0 24 24"
62-
>
60+
viewBox="0 0 24 24">
6361
<path d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z" />
6462
</svg>
6563
</a>
@@ -77,8 +75,7 @@ const MemberCard = ({
7775
xmlns="http://www.w3.org/2000/svg"
7876
width="24"
7977
height="24"
80-
viewBox="0 0 24 24"
81-
>
78+
viewBox="0 0 24 24">
8279
<path d="M19 0h-14c-2.761 0-5 2.239-5 5v14c0 2.761 2.239 5 5 5h14c2.762 0 5-2.239 5-5v-14c0-2.761-2.238-5-5-5zm-11 19h-3v-11h3v11zm-1.5-12.268c-.966 0-1.75-.79-1.75-1.764s.784-1.764 1.75-1.764 1.75.79 1.75 1.764-.783 1.764-1.75 1.764zm13.5 12.268h-3v-5.604c0-3.368-4-3.113-4 0v5.604h-3v-11h3v1.765c1.396-2.586 7-2.777 7 2.476v6.759z" />
8380
</svg>
8481
</a>
@@ -96,8 +93,7 @@ const MemberCard = ({
9693
xmlns="http://www.w3.org/2000/svg"
9794
width="24"
9895
height="24"
99-
viewBox="0 0 24 24"
100-
>
96+
viewBox="0 0 24 24">
10197
<path d="M12 12.713l-11.985-9.713h23.971l-11.986 9.713zm-5.425-1.822l-6.575-5.329v12.501l6.575-7.172zm10.85 0l6.575 7.172v-12.501l-6.575 5.329zm-1.557 1.261l-3.868 3.135-3.868-3.135-8.11 8.848h23.956l-8.11-8.848z" />
10298
</svg>
10399
</a>

src/data/alumniData.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ export type Member = {
1717
// Below 4 are contact methods; Each should be a link ("href" attribute in <a>)
1818
readonly links: {
1919
readonly website?: string;
20-
readonly github?: string;
21-
readonly linkedin?: string;
22-
readonly email?: string;
20+
readonly github?: `https://github.com/${string}`;
21+
readonly linkedin?: `https://www.linkedin.com/in/${string}`;
22+
readonly email?: `mailto:${string}`;
2323
};
2424
// Below is the preferred contact method;
2525
// clicking the profile image leads to this type of link

src/pages/alumni.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ export default function Alumni(): ReactElement {
1010
return (
1111
<Layout
1212
title="Our Alumni"
13-
description="The alumni directory of Computerization club"
14-
>
13+
description="The alumni directory of Computerization club">
1514
<main>
1615
<div className="container margin-vert--lg">
1716
<div className={styles.content}>
@@ -27,8 +26,7 @@ export default function Alumni(): ReactElement {
2726
Computerization/docusaurus
2827
</a>
2928
),
30-
}}
31-
>
29+
}}>
3230
{
3331
'如果你是信息化社的过往成员,并且希望我们更新你的个人信息或链接,请在 {link} 仓库中提交 issue 或 pull request。你也可以微信联系我们。'
3432
}

src/pages/index.tsx

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ const features = [
1616
values={{
1717
link1: <a href="https://vuejs.org/">Vue</a>,
1818
link2: <a href="https://docusaurus.io">Docusaurus</a>,
19-
}}
20-
>
19+
}}>
2120
{
2221
'在C社,学习 {link1}, {link2} 等多个前端框架,使用 GitHub 进行多人合作项目开发,并用所学的技巧创建自己的个人页面,参与社团平台搭建,充分展现你的创意与才智!'
2322
}
@@ -52,8 +51,7 @@ function Home(): JSX.Element {
5251
return (
5352
<Layout
5453
title={`Hello from ${siteConfig.title}`}
55-
description="C社 << Computerization << 世外信息化社"
56-
>
54+
description="C社 << Computerization << 世外信息化社">
5755
<header className={clsx('hero hero--primary', styles.heroBanner)}>
5856
<div className="container">
5957
<h1 className="hero__title">{siteConfig.title}</h1>
@@ -65,8 +63,7 @@ function Home(): JSX.Element {
6563
styles.getStarted
6664
)}
6765
id={styles.getStarted}
68-
to="docs/about-us"
69-
>
66+
to="docs/about-us">
7067
<Translate id="frontpage.button">了解更多</Translate>
7168
</Link>
7269
</div>
@@ -90,8 +87,7 @@ function Home(): JSX.Element {
9087
// Anyway we're going to implement our own index [age] some day later
9188
// eslint-disable-next-line react/no-array-index-key
9289
key={idx}
93-
className={clsx('col col--4', styles.feature)}
94-
>
90+
className={clsx('col col--4', styles.feature)}>
9591
{imageUrl && (
9692
<div className="text--center">
9793
<img

0 commit comments

Comments
 (0)