Skip to content

Commit bbea5d5

Browse files
committed
Linter
1 parent 929436a commit bbea5d5

File tree

17 files changed

+53
-69
lines changed

17 files changed

+53
-69
lines changed

src/app/privacy/page.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
import SectionGeneric from '@/components/LandingPage/sections/SectionGeneric';
44
import PaddingBlock from '@/components/LandingPage/components/PaddedBlock/PaddedBlock';
55
import Hero from '@/components/LandingPage/layout/Hero/Hero';
6-
import styles from '@/components/LandingPage/LandingPage.module.css';
76
import LogoAsLink from '@/components/logo/as-link';
87

98
import { EnumSection } from '@/components/LandingPage/sections/sections';
109
import { classNames } from '@/util/utils';
10+
import styles from '@/components/LandingPage/LandingPage.module.css';
1111

1212
export default function page() {
1313
return (
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,44 @@
11
.blueBackground {
2-
width: 100%;
3-
overflow: visible;
4-
height: 33vh;
5-
z-index: 0;
2+
width: 100%;
3+
overflow: visible;
4+
height: 33vh;
5+
z-index: 0;
66
}
77

88
.blueBackground > div {
9-
width: 100vw;
10-
height: 100vh;
11-
background-color: var(--color-primary);
12-
z-index: 0;
9+
width: 100vw;
10+
height: 100vh;
11+
background-color: var(--color-primary);
12+
z-index: 0;
1313
}
1414

1515
.newsPage {
16-
z-index: 1;
16+
z-index: 1;
1717
}
1818

1919
header.header {
20-
grid-column: 1/-1;
21-
color: #fffe;
20+
grid-column: 1/-1;
21+
color: #fffe;
2222
}
2323

2424
header.header h1 {
25-
font-size: calc(2.0 * var(--font-size-XL));
26-
margin: 0;
27-
margin-bottom: .5em;
25+
font-size: calc(2 * var(--font-size-XL));
26+
margin: 0;
27+
margin-bottom: 0.5em;
2828
}
2929

3030
header.header h2 {
31-
font-family: var(--font-sans-serif);
31+
font-family: var(--font-sans-serif);
3232
}
3333

3434
.notes {
35-
color: #3bf;
36-
font-size: var(--font-size-M);
37-
margin-bottom: 3em;
38-
display: flex;
39-
flex-wrap: wrap;
40-
flex-direction: row;
41-
justify-content: space-between;
42-
align-items: center;
43-
gap: 32px;
35+
color: #3bf;
36+
font-size: var(--font-size-M);
37+
margin-bottom: 3em;
38+
display: flex;
39+
flex-wrap: wrap;
40+
flex-direction: row;
41+
justify-content: space-between;
42+
align-items: center;
43+
gap: 32px;
4444
}

src/components/LandingPage/components/NewsPage/NewsPage.tsx

+2-5
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,13 @@ import { EnumSection } from '../../sections/sections';
88
import FooterPanel from '../../layout/FooterPanel';
99
import { styleBlockSmall } from '../../styles';
1010
import PaddedBlock from '../PaddedBlock';
11-
import Title from '../Title';
12-
import { Text } from '../Text';
1311
import stylesLandingPage from '../../LandingPage.module.css';
14-
import { classNames } from '@/util/utils';
1512

16-
import styles from './NewsPage.module.css';
1713
import ProgressiveImage from '../ProgressiveImage';
1814
import SanityContentRTF from '../SanityContentRTF';
1915
import Menu from '../../layout/Menu';
16+
import { classNames } from '@/util/utils';
17+
import styles from './NewsPage.module.css';
2018

2119
export interface NewsPageProps {
2220
className?: string;
@@ -66,4 +64,3 @@ function formatDate(d: string) {
6664
const fmt = new Intl.DateTimeFormat('en', { dateStyle: 'long' });
6765
return fmt.format(date);
6866
}
69-

src/components/LandingPage/components/SanityContentRTF/SanityContentRTF.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ import SanityContentItems from './SanityContentItems';
1717
import SanityContentWidget from './SanityContentWidget';
1818
import SanityContentVerticalDivider from './SanityContentVerticalSpace';
1919
import SanityContentPreview from './SanityContentPreview';
20-
import { logError } from '@/util/logger';
2120
import SanityContentImage from './sanity-content-image';
21+
import { logError } from '@/util/logger';
2222

2323
export interface SanityContentRTFProps {
2424
className?: string;

src/components/LandingPage/components/SanityContentRTF/SanityContentWidget/SanityContentWidget.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import { WidgetSwipeableList } from '@/components/LandingPage/widgets/swipeable-
1919
import WidgetMultipleMember from '@/components/LandingPage/widgets/multiple-member/multiple-member';
2020
import WidgetPriceList2 from '@/components/LandingPage/widgets/price-list-2/price-list-2';
2121
import WidgetRepositories from '@/components/LandingPage/widgets/repositories';
22-
import Title from '../../Title';
2322

2423
export interface SanityContentWidgetProps {
2524
value: ContentForRichTextWidget;
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export { default } from "./sanity-content-image"
1+
export { default } from './sanity-content-image';
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export { default } from "./social-media-links"
1+
export { default } from './social-media-links';
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export { default } from "./swipeable-cards-list"
1+
export { default } from './swipeable-cards-list';

src/components/LandingPage/components/swipeable-cards-list/swipeable-cards-list.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,6 @@ function useScrollWatcher(
130130
if (!card) continue;
131131

132132
const x = card.getBoundingClientRect().x - xDiv;
133-
console.log('🚀 [swipeable-cards-list] index, x = ', index, x); // @FIXME: Remove this line written on 2025-02-18 at 17:49
134133
if (x >= 0) {
135134
setCardIndex(index);
136135
return;

src/components/LandingPage/content/_common.ts

+2-9
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,13 @@
11
import { PortableTextBlock } from '@portabletext/react';
2-
import { logError } from '@/util/logger';
32
import { assertType, TypeDef } from '@/util/type-guards';
43

54
/**
65
* Check a type and log an explicit error in case of failure.
76
* @returns `true` if the type is correct.
87
*/
98
export function tryType(typeName: string, data: unknown, type: TypeDef): boolean {
10-
try {
11-
assertType(data, type);
12-
return true;
13-
} catch (ex) {
14-
throw ex;
15-
logError(`Invalid format for data ${typeName}!`, data, ex);
16-
return false;
17-
}
9+
assertType(data, type);
10+
return true;
1811
}
1912

2013
export type RichText = PortableTextBlock | PortableTextBlock[];

src/components/LandingPage/content/news.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* eslint-disable no-param-reassign */
2-
import { RichText, tryType, typeImage } from './_common';
2+
import { tryType, typeImage } from './_common';
33
import { useSanity } from './content';
44
import { ContentForRichText, typeBooleanOrNull, typeStringOrNull } from './types';
55
import { isNumber } from '@/util/type-guards';

src/components/LandingPage/layout/FooterPanel/FooterPanel.module.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
}
2525

2626
.copyright {
27-
font-size: var(--font-size-S);
27+
font-size: var(--font-size-S);
2828
}
2929

3030
.title > h2 {

src/components/LandingPage/layout/FooterPanel/FooterPanel.tsx

+1-4
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,11 @@ import VerticalRuler from '../../components/VerticalRuler';
44
import { EnumSection } from '../../sections/sections';
55
import { MENU_ITEMS } from '../../constants';
66
import { gotoSection } from '../../utils';
7-
import IconLinkedin from './icons/iconLinkedin';
8-
import IconTwitter from './icons/iconTwitter';
9-
import IconBlueSky from './icons/iconBlueSky';
7+
import SocialMediaLinks from '../../components/social-media-links';
108
import NewsLetterSubscription from './NewsLetterSubscription';
119
import { classNames } from '@/util/utils';
1210

1311
import styles from './FooterPanel.module.css';
14-
import SocialMediaLinks from '../../components/social-media-links';
1512

1613
export interface FooterPanelProps {
1714
className?: string;

src/components/LandingPage/sections/SectionNews/Card/Card.module.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
}
1818

1919
.card.small .content {
20-
flex-direction: column;
20+
flex-direction: column;
2121
}
2222

2323
.card > h1 {

src/components/LandingPage/sections/SectionNews/SectionNews.module.css

+8-8
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,15 @@ hr.separator {
4242
}
4343

4444
.copyright {
45-
color: var(--color-neutral);
46-
font-size: var(--font-size-S);
45+
color: var(--color-neutral);
46+
font-size: var(--font-size-S);
4747
}
4848

4949
div.epfl {
50-
display: flex;
51-
flex-wrap: wrap;
52-
flex-direction: row;
53-
justify-content: flex-start;
54-
align-items: flex-start;
55-
gap: 24px;
50+
display: flex;
51+
flex-wrap: wrap;
52+
flex-direction: row;
53+
justify-content: flex-start;
54+
align-items: flex-start;
55+
gap: 24px;
5656
}

src/components/LandingPage/styles.module.css

+8-8
Original file line numberDiff line numberDiff line change
@@ -54,16 +54,16 @@ button.squareButton {
5454
}
5555

5656
.layout .blockSmall {
57-
grid-column: 5/6;
58-
max-width: var(--S);
59-
}
57+
grid-column: 5/6;
58+
max-width: var(--S);
59+
}
6060

61-
.layout .blockSmallExpandRight {
62-
grid-column: 5/-1;
63-
max-width: none;
64-
}
61+
.layout .blockSmallExpandRight {
62+
grid-column: 5/-1;
63+
max-width: none;
64+
}
6565

66-
.layout .blockMedium {
66+
.layout .blockMedium {
6767
grid-column: 4/7;
6868
max-width: var(--M);
6969
}

src/components/LandingPage/widgets/News/NewsCard/NewsCard.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,3 @@ function gotoNews(newsId: string): void {
4848
const url = sanitizeURL(`${section.slug}/${newsId}`);
4949
window.location.href = url;
5050
}
51-

0 commit comments

Comments
 (0)