Skip to content

Commit eec6860

Browse files
fix: add .prettierrc and fix code formatting (#7)
1 parent dc349b1 commit eec6860

Some content is hidden

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

46 files changed

+567
-560
lines changed

.prettierrc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"endOfLine": "lf",
3+
"semi": true,
4+
"singleQuote": true,
5+
"jsxSingleQuote": true,
6+
"tabWidth": 2,
7+
"trailingComma": "none",
8+
"arrowParens": "avoid"
9+
}

apps/api/.lintstagedrc.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
/* eslint-disable filenames-simple/naming-convention */
2-
import { createLintStagedConfig } from "@freecodecamp/eslint-config/lintstaged";
2+
import { createLintStagedConfig } from '@freecodecamp/eslint-config/lintstaged';
33

44
export default createLintStagedConfig(import.meta.dirname);

apps/api/configs/paths.ts

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,37 @@
1-
import { join } from "path";
2-
import * as dotenv from "dotenv";
1+
import { join } from 'path';
2+
import * as dotenv from 'dotenv';
33
dotenv.config();
44

55
export const SUPERBLOCK_META_DIR = join(
66
process.cwd(),
77
process.env.FCC_REPO_LOCATION!,
8-
"curriculum",
9-
"structure",
10-
"superblocks",
8+
'curriculum',
9+
'structure',
10+
'superblocks'
1111
);
1212

1313
export const BLOCK_META_DIR = join(
1414
process.cwd(),
1515
process.env.FCC_REPO_LOCATION!,
16-
"curriculum",
17-
"structure",
18-
"blocks",
16+
'curriculum',
17+
'structure',
18+
'blocks'
1919
);
2020

2121
export const CHALLENGE_DIR = join(
2222
process.cwd(),
2323
process.env.FCC_REPO_LOCATION!,
24-
"curriculum",
25-
"challenges",
26-
"english",
27-
"blocks",
24+
'curriculum',
25+
'challenges',
26+
'english',
27+
'blocks'
2828
);
2929

3030
export const ENGLISH_LANG_DIR = join(
3131
process.cwd(),
3232
process.env.FCC_REPO_LOCATION!,
33-
"client",
34-
"i18n",
35-
"locales",
36-
"english",
33+
'client',
34+
'i18n',
35+
'locales',
36+
'english'
3737
);
Lines changed: 59 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,118 +1,118 @@
11
export const superBlockList = [
22
{
3-
name: "Legacy Responsive Web Design",
4-
path: "responsive-web-design",
3+
name: 'Legacy Responsive Web Design',
4+
path: 'responsive-web-design'
55
},
66
{
7-
name: "Legacy JavaScript Algorithms and Data Structures",
8-
path: "javascript-algorithms-and-data-structures",
7+
name: 'Legacy JavaScript Algorithms and Data Structures',
8+
path: 'javascript-algorithms-and-data-structures'
99
},
1010
{
11-
name: "Front End Development Libraries",
12-
path: "front-end-development-libraries",
11+
name: 'Front End Development Libraries',
12+
path: 'front-end-development-libraries'
1313
},
1414
{
15-
name: "Data Visualization",
16-
path: "data-visualization",
15+
name: 'Data Visualization',
16+
path: 'data-visualization'
1717
},
1818
{
19-
name: "Back End Development and APIs",
20-
path: "back-end-development-and-apis",
19+
name: 'Back End Development and APIs',
20+
path: 'back-end-development-and-apis'
2121
},
2222
{
23-
name: "Quality Assurance",
24-
path: "quality-assurance",
23+
name: 'Quality Assurance',
24+
path: 'quality-assurance'
2525
},
2626
{
27-
name: "Scientific Computing with Python",
28-
path: "scientific-computing-with-python",
27+
name: 'Scientific Computing with Python',
28+
path: 'scientific-computing-with-python'
2929
},
3030
{
31-
name: "Data Analysis with Python",
32-
path: "data-analysis-with-python",
31+
name: 'Data Analysis with Python',
32+
path: 'data-analysis-with-python'
3333
},
3434
{
35-
name: "Information Security",
36-
path: "information-security",
35+
name: 'Information Security',
36+
path: 'information-security'
3737
},
3838
{
39-
name: "Coding Interview Prep",
40-
path: "coding-interview-prep",
39+
name: 'Coding Interview Prep',
40+
path: 'coding-interview-prep'
4141
},
4242
{
43-
name: "Machine Learning with Python",
44-
path: "machine-learning-with-python",
43+
name: 'Machine Learning with Python',
44+
path: 'machine-learning-with-python'
4545
},
4646
{
47-
name: "Relational Databases",
48-
path: "relational-databases",
47+
name: 'Relational Databases',
48+
path: 'relational-databases'
4949
},
5050
{
51-
name: "Responsive Web Design",
52-
path: "responsive-web-design-22",
51+
name: 'Responsive Web Design',
52+
path: 'responsive-web-design-22'
5353
},
5454
{
55-
name: "JavaScript Algorithms and Data Structures",
56-
path: "javascript-algorithms-and-data-structures-22",
55+
name: 'JavaScript Algorithms and Data Structures',
56+
path: 'javascript-algorithms-and-data-structures-22'
5757
},
5858
{
59-
name: "The Odin Project",
60-
path: "the-odin-project",
59+
name: 'The Odin Project',
60+
path: 'the-odin-project'
6161
},
6262
{
63-
name: "College Algebra with Python",
64-
path: "college-algebra-with-python",
63+
name: 'College Algebra with Python',
64+
path: 'college-algebra-with-python'
6565
},
6666
{
67-
name: "Project Euler",
68-
path: "project-euler",
67+
name: 'Project Euler',
68+
path: 'project-euler'
6969
},
7070
{
71-
name: "(New) Foundational C# with Microsoft",
72-
path: "foundational-c-sharp-with-microsoft",
71+
name: '(New) Foundational C# with Microsoft',
72+
path: 'foundational-c-sharp-with-microsoft'
7373
},
7474
{
75-
name: "A2 English for Developers",
76-
path: "a2-english-for-developers",
75+
name: 'A2 English for Developers',
76+
path: 'a2-english-for-developers'
7777
},
7878
{
79-
name: "Rosetta Code",
80-
path: "rosetta-code",
79+
name: 'Rosetta Code',
80+
path: 'rosetta-code'
8181
},
8282
{
83-
name: "Python For Everybody",
84-
path: "python-for-everybody",
83+
name: 'Python For Everybody',
84+
path: 'python-for-everybody'
8585
},
8686
{
87-
name: "B1 English for Developers (Beta)",
88-
path: "b1-english-for-developers",
87+
name: 'B1 English for Developers (Beta)',
88+
path: 'b1-english-for-developers'
8989
},
9090
{
91-
name: "Certified Full Stack Developer",
92-
path: "full-stack-developer",
91+
name: 'Certified Full Stack Developer',
92+
path: 'full-stack-developer'
9393
},
9494
{
95-
name: "A1 Professional Spanish (Beta)",
96-
path: "a1-professional-spanish",
95+
name: 'A1 Professional Spanish (Beta)',
96+
path: 'a1-professional-spanish'
9797
},
9898
{
99-
name: "A2 Professional Spanish (Beta)",
100-
path: "a2-professional-spanish",
99+
name: 'A2 Professional Spanish (Beta)',
100+
path: 'a2-professional-spanish'
101101
},
102102
{
103-
name: "A2 Professional Chinese (Beta)",
104-
path: "a2-professional-chinese",
103+
name: 'A2 Professional Chinese (Beta)',
104+
path: 'a2-professional-chinese'
105105
},
106106
{
107-
name: "Basic HTML",
108-
path: "basic-html",
107+
name: 'Basic HTML',
108+
path: 'basic-html'
109109
},
110110
{
111-
name: "Semantic HTML",
112-
path: "semantic-html",
111+
name: 'Semantic HTML',
112+
path: 'semantic-html'
113113
},
114114
{
115-
name: "A1 Professional Chinese (Beta)",
116-
path: "a1-professional-chinese",
117-
},
115+
name: 'A1 Professional Chinese (Beta)',
116+
path: 'a1-professional-chinese'
117+
}
118118
];

apps/api/eslint.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
import { configTypeChecked } from "@freecodecamp/eslint-config/base";
1+
import { configTypeChecked } from '@freecodecamp/eslint-config/base';
22

33
export default configTypeChecked;

apps/api/interfaces/tools.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
type ToolsFunction = (
2-
directory: string,
2+
directory: string
33
) => Promise<{ stdout: string; stderr: string }>;
44

55
type ToolsFunctionWithArg = (
66
directory: string,
7-
start: number,
7+
start: number
88
) => Promise<{ stdout: string; stderr: string }>;
99

1010
export interface ToolsSwitch {
11-
"create-next-step": ToolsFunction;
12-
"create-empty-steps": ToolsFunctionWithArg;
13-
"insert-step": ToolsFunctionWithArg;
14-
"delete-step": ToolsFunctionWithArg;
15-
"update-step-titles": ToolsFunction;
11+
'create-next-step': ToolsFunction;
12+
'create-empty-steps': ToolsFunctionWithArg;
13+
'insert-step': ToolsFunctionWithArg;
14+
'delete-step': ToolsFunctionWithArg;
15+
'update-step-titles': ToolsFunction;
1616
}

apps/api/reset.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
import "@total-typescript/ts-reset";
1+
import '@total-typescript/ts-reset';

apps/api/routes/block-route.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import { Request, Response } from "express";
2-
import { getSteps } from "../utils/get-steps";
1+
import { Request, Response } from 'express';
2+
import { getSteps } from '../utils/get-steps';
33

44
export const blockRoute = async (
55
req: Request,
6-
res: Response,
6+
res: Response
77
): Promise<void> => {
88
const { superblock, block } = req.params;
99

apps/api/routes/index-route.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { Request, Response } from "express";
2-
import { superBlockList } from "../configs/super-block-list";
1+
import { Request, Response } from 'express';
2+
import { superBlockList } from '../configs/super-block-list';
33

44
export const indexRoute = (req: Request, res: Response): void => {
55
res.json(superBlockList);

apps/api/routes/module-block-route.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import { Request, Response } from "express";
2-
import { getBlocks } from "../utils/get-full-stack-blocks";
1+
import { Request, Response } from 'express';
2+
import { getBlocks } from '../utils/get-full-stack-blocks';
33

44
export const moduleBlockRoute = async (
55
req: Request,
6-
res: Response,
6+
res: Response
77
): Promise<void> => {
88
const { superblock, chapter, module } = req.params;
99

0 commit comments

Comments
 (0)