Skip to content

Commit 27a82e8

Browse files
committed
website: change formatting
1 parent 598a0dc commit 27a82e8

File tree

12 files changed

+48
-49
lines changed

12 files changed

+48
-49
lines changed

.prettierrc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
2-
"bracketSpacing": false,
3-
"jsxBracketSameLine": true,
2+
"bracketSameLine": true,
43
"printWidth": 80,
54
"proseWrap": "never",
65
"singleQuote": true,

contents/_components/QuestionList.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React from 'react';
22

33
import QuestionGroups from './QuestionGroups.json';
44

5-
function DifficultyLabel({difficulty}) {
5+
function DifficultyLabel({ difficulty }) {
66
return (
77
<span
88
style={{

website/blog/2022-04-20-take-control-over-your-coding-interview copy.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -130,14 +130,14 @@ Depending on where the pricing data comes from, one possible variation of the ta
130130
```javascript
131131
// config.js
132132
export const priceByRanges = [
133-
{min: 1, max: 5, price: '5'},
134-
{min: 6, max: 10, price: '4'},
135-
{min: 11, max: 20, price: '3'},
136-
{min: 21, max: Number.MAX_SAFE_INTEGER, price: '2.5'},
133+
{ min: 1, max: 5, price: '5' },
134+
{ min: 6, max: 10, price: '4' },
135+
{ min: 11, max: 20, price: '3' },
136+
{ min: 21, max: Number.MAX_SAFE_INTEGER, price: '2.5' },
137137
];
138138

139139
// app.js
140-
import {priceByRanges} from './config.js';
140+
import { priceByRanges } from './config.js';
141141

142142
function getPrice(amount) {
143143
// error handling for amount outside the range
@@ -155,10 +155,10 @@ If the array `priceByRanges` is always sorted in terms of the price ranges, we c
155155

156156
```javascript
157157
const priceByRanges = [
158-
{min: 1, max: 5, price: '5'},
159-
{min: 6, max: 10, price: '4'},
160-
{min: 11, max: 20, price: '3'},
161-
{min: 21, max: Number.MAX_SAFE_INTEGER, price: '2.5'},
158+
{ min: 1, max: 5, price: '5' },
159+
{ min: 6, max: 10, price: '4' },
160+
{ min: 11, max: 20, price: '3' },
161+
{ min: 21, max: Number.MAX_SAFE_INTEGER, price: '2.5' },
162162
];
163163

164164
function getPrice(amount) {

website/docusaurus.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ module.exports = {
4040
label: 'Algorithms',
4141
href: '/algorithms/study-cheatsheet',
4242
},
43-
{label: 'Blog', to: 'blog', position: 'left'},
43+
{ label: 'Blog', to: 'blog', position: 'left' },
4444
{
4545
label: 'Grind 75',
4646
href: 'https://www.techinterviewhandbook.org/grind75',

website/src/components/SidebarAd/index.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, {useEffect, useState} from 'react';
1+
import React, { useEffect, useState } from 'react';
22
import BrowserOnly from '@docusaurus/BrowserOnly';
33

44
import clsx from 'clsx';
@@ -7,7 +7,7 @@ import styles from './styles.module.css';
77

88
const AD_REFRESH_RATE = 20 * 1000;
99

10-
function FAANGTechLeads({position}) {
10+
function FAANGTechLeads({ position }) {
1111
return (
1212
<a
1313
className={clsx(styles.container, styles.backgroundFTL)}
@@ -29,7 +29,7 @@ function FAANGTechLeads({position}) {
2929
);
3030
}
3131

32-
function AlgoMonster({position}) {
32+
function AlgoMonster({ position }) {
3333
return (
3434
<a
3535
className={clsx(styles.container, styles.backgroundAlgoMonster)}
@@ -50,7 +50,7 @@ function AlgoMonster({position}) {
5050
);
5151
}
5252

53-
function Moonchaser({position}) {
53+
function Moonchaser({ position }) {
5454
return (
5555
<a
5656
className={clsx(styles.container, styles.backgroundMoonchaser)}
@@ -73,7 +73,7 @@ function Moonchaser({position}) {
7373
);
7474
}
7575

76-
function DesignGurusCoding({position}) {
76+
function DesignGurusCoding({ position }) {
7777
return (
7878
<a
7979
className={clsx(styles.container, styles.backgroundGrokkingCoding)}
@@ -93,7 +93,7 @@ function DesignGurusCoding({position}) {
9393
);
9494
}
9595

96-
function DesignGurusSystemDesign({position}) {
96+
function DesignGurusSystemDesign({ position }) {
9797
return (
9898
<a
9999
className={clsx(styles.container, styles.backgroundGrokkingSystemDesign)}
@@ -113,7 +113,7 @@ function DesignGurusSystemDesign({position}) {
113113
);
114114
}
115115

116-
function ByteByteGoSystemDesign({position}) {
116+
function ByteByteGoSystemDesign({ position }) {
117117
return (
118118
<a
119119
className={clsx(styles.container, styles.backgroundByteByteGo)}
@@ -136,7 +136,7 @@ function ByteByteGoSystemDesign({position}) {
136136
);
137137
}
138138

139-
function Interviewingio({position}) {
139+
function Interviewingio({ position }) {
140140
return (
141141
<a
142142
className={clsx(styles.container, styles.backgroundInterviewingio)}
@@ -159,7 +159,7 @@ function Interviewingio({position}) {
159159
);
160160
}
161161

162-
export default React.memo(function SidebarAd({position}) {
162+
export default React.memo(function SidebarAd({ position }) {
163163
const [counter, setCounter] = useState(0);
164164
useEffect(() => {
165165
const timer = setTimeout(() => {

website/src/data/successStories.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -157,10 +157,10 @@ export default [
157157
target="_blank"
158158
rel="noreferrer noopener">
159159
Grind 75 Tool
160-
</a>,
161-
which provides customisable coding interview study plans. This not only
162-
helped to sharpen my problem-solving skills, but also assured me that
163-
I covered sufficient breadth and depth.
160+
</a>
161+
, which provides customisable coding interview study plans. This not
162+
only helped to sharpen my problem-solving skills, but also assured me
163+
that I covered sufficient breadth and depth.
164164
<br />
165165
<br />
166166
Even now, after interviewing for a couple of years, I still go back to

website/src/pages/index.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ const FEATURES = [
7979
},
8080
];
8181

82-
function Tweet({url, handle, name, content, avatar, date}) {
82+
function Tweet({ url, handle, name, content, avatar, date }) {
8383
return (
8484
<div className={clsx('card', styles.tweet)}>
8585
<div className="card__header">
@@ -104,7 +104,7 @@ function Tweet({url, handle, name, content, avatar, date}) {
104104
}
105105

106106
function Home() {
107-
const {siteConfig = {}} = useDocusaurusContext();
107+
const { siteConfig = {} } = useDocusaurusContext();
108108
return (
109109
<Layout
110110
title="Technical Interview Guide for Busy Engineers"
@@ -125,7 +125,7 @@ function Home() {
125125
}
126126

127127
function HeroSection() {
128-
const {siteConfig = {}} = useDocusaurusContext();
128+
const { siteConfig = {} } = useDocusaurusContext();
129129

130130
return (
131131
<header className={clsx('hero', styles.heroBanner)}>
@@ -150,7 +150,7 @@ function HeroSection() {
150150
Start reading now&nbsp;&nbsp;→
151151
</Link>
152152
</div>
153-
<p className="margin-top--md" style={{fontSize: 16, fontWeight: 600}}>
153+
<p className="margin-top--md" style={{ fontSize: 16, fontWeight: 600 }}>
154154
Or check out our{' '}
155155
<a href="https://www.frontendinterviewhandbook.com">
156156
Front End Interview Handbook
@@ -263,7 +263,7 @@ function MoonchaserSection() {
263263
);
264264
}
265265

266-
function HowToUseStep({index, title, ctaLink, contents}) {
266+
function HowToUseStep({ index, title, ctaLink, contents }) {
267267
return (
268268
<div className={clsx('card', styles.howToUseStep)}>
269269
<div className="card__header">
@@ -395,7 +395,7 @@ function FeaturesSection() {
395395
We have everything you need - all straight to the point
396396
</h3>
397397
<div className={clsx('row', styles.featuresRow)}>
398-
{FEATURES.map(({title, description, link}, idx) => (
398+
{FEATURES.map(({ title, description, link }, idx) => (
399399
<div
400400
key={idx}
401401
className={clsx(
@@ -428,13 +428,13 @@ function DesignGurusSection() {
428428
return (
429429
<div
430430
className={clsx('padding-vert--lg')}
431-
style={{backgroundColor: '#6fc8cc'}}>
431+
style={{ backgroundColor: '#6fc8cc' }}>
432432
<div className="container">
433433
<div className="row">
434434
<div className="col col--8 col--offset-2">
435435
<div className="margin-vert--lg text--center">
436436
<div>
437-
<h2 style={{color: '#083436'}}>
437+
<h2 style={{ color: '#083436' }}>
438438
<strong>
439439
Tired of grinding mindlessly? Grokking the Coding Interview
440440
is the recommended way to quickly learn coding question
@@ -466,7 +466,7 @@ function FAANGTechLeadsSection() {
466466
return (
467467
<div
468468
className={clsx('padding-vert--lg')}
469-
style={{backgroundColor: 'rgb(244, 63, 94)'}}>
469+
style={{ backgroundColor: 'rgb(244, 63, 94)' }}>
470470
<div className="container">
471471
<div className="row">
472472
<div className="col col--8 col--offset-2">
@@ -503,7 +503,7 @@ function AlgoMonsterSection() {
503503
return (
504504
<div
505505
className={clsx('padding-vert--lg')}
506-
style={{backgroundImage: 'linear-gradient(270deg, #3e1792, #6a45b9)'}}>
506+
style={{ backgroundImage: 'linear-gradient(270deg, #3e1792, #6a45b9)' }}>
507507
<div className="container">
508508
<div className="row">
509509
<div className="col col--8 col--offset-2">
@@ -712,7 +712,7 @@ function TweetsSection() {
712712
);
713713
}
714714

715-
function SuccessStory({name, quote, thumbnail, title}) {
715+
function SuccessStory({ name, quote, thumbnail, title }) {
716716
return (
717717
<div className="card margin-vert--lg">
718718
<div className="card__body">

website/src/theme/DocItem/Content/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22
import clsx from 'clsx';
3-
import {ThemeClassNames} from '@docusaurus/theme-common';
4-
import {useDoc} from '@docusaurus/theme-common/internal';
3+
import { ThemeClassNames } from '@docusaurus/theme-common';
4+
import { useDoc } from '@docusaurus/theme-common/internal';
55
import Heading from '@theme/Heading';
66
import MDXContent from '@theme/MDXContent';
77
/**
@@ -15,15 +15,15 @@ import MDXContent from '@theme/MDXContent';
1515
- the markdown content does not already contain a top-level h1 heading
1616
*/
1717
function useSyntheticTitle() {
18-
const {metadata, frontMatter, contentTitle} = useDoc();
18+
const { metadata, frontMatter, contentTitle } = useDoc();
1919
const shouldRender =
2020
!frontMatter.hide_title && typeof contentTitle === 'undefined';
2121
if (!shouldRender) {
2222
return null;
2323
}
2424
return metadata.title;
2525
}
26-
export default function DocItemContent({children}) {
26+
export default function DocItemContent({ children }) {
2727
const syntheticTitle = useSyntheticTitle();
2828
return (
2929
<div className={clsx(ThemeClassNames.docs.docMarkdown, 'markdown')}>

website/src/theme/DocItem/Layout/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22
import clsx from 'clsx';
3-
import {useWindowSize} from '@docusaurus/theme-common';
4-
import {useDoc} from '@docusaurus/theme-common/internal';
3+
import { useWindowSize } from '@docusaurus/theme-common';
4+
import { useDoc } from '@docusaurus/theme-common/internal';
55
import DocItemPaginator from '@theme/DocItem/Paginator';
66
import DocVersionBanner from '@theme/DocVersionBanner';
77
import DocVersionBadge from '@theme/DocVersionBadge';
@@ -17,7 +17,7 @@ import SidebarAd from '../../../components/SidebarAd';
1717
* Decide if the toc should be rendered, on mobile or desktop viewports
1818
*/
1919
function useDocTOC() {
20-
const {frontMatter, toc} = useDoc();
20+
const { frontMatter, toc } = useDoc();
2121
const windowSize = useWindowSize();
2222
const hidden = frontMatter.hide_table_of_contents;
2323
const canRender = !hidden && toc.length > 0;
@@ -32,7 +32,7 @@ function useDocTOC() {
3232
desktop,
3333
};
3434
}
35-
export default function DocItemLayout({children}) {
35+
export default function DocItemLayout({ children }) {
3636
const docTOC = useDocTOC();
3737
return (
3838
<div className="row">
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
import type {Props} from '@theme/DocSidebar/Mobile';
2+
import type { Props } from '@theme/DocSidebar/Mobile';
33
declare function DocSidebarMobile(props: Props): JSX.Element;
44
declare const _default: React.MemoExoticComponent<typeof DocSidebarMobile>;
55
export default _default;

0 commit comments

Comments
 (0)