chore: update prettier
This commit is contained in:
parent
057294a985
commit
12ed6cf0c2
21 changed files with 93 additions and 125 deletions
|
@ -76,7 +76,7 @@ async function main() {
|
|||
JSON.stringify({
|
||||
...portfolioData,
|
||||
skills: Array.from(portfolioData.skills),
|
||||
})
|
||||
}),
|
||||
)
|
||||
|
||||
saveIndex()
|
||||
|
|
|
@ -55,7 +55,7 @@ const processor = unified() // interface for remark and rehype
|
|||
export default async function parseMarkdown(
|
||||
markdownRaw: string,
|
||||
path: string,
|
||||
mode: ParseMode
|
||||
mode: ParseMode,
|
||||
): Promise<MarkdownData> {
|
||||
const fileHasFrontMatter = markdownRaw.startsWith("---")
|
||||
|
||||
|
@ -75,14 +75,14 @@ export default async function parseMarkdown(
|
|||
if (mode === ParseMode.PORTFOLIO) {
|
||||
if (frontMatter.overview) {
|
||||
frontMatter.overview = String(
|
||||
processor.processSync(frontMatter.overview)
|
||||
processor.processSync(frontMatter.overview),
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
frontMatter.content = touchupHTML(
|
||||
String(processor.processSync(markdownRaw))
|
||||
String(processor.processSync(markdownRaw)),
|
||||
)
|
||||
|
||||
return frontMatter as MarkdownData
|
||||
|
@ -107,7 +107,7 @@ function touchupHTML(html: string): string {
|
|||
dom.window.document.querySelectorAll(".footnotes").forEach((item) => {
|
||||
item.parentNode?.insertBefore(
|
||||
dom.window.document.createElement("hr"),
|
||||
item
|
||||
item,
|
||||
)
|
||||
})
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ export function parseSeries() {
|
|||
for (const seriesURL in seriesMap) {
|
||||
contentMap.series[seriesURL].length = seriesMap[seriesURL].length
|
||||
contentMap.series[seriesURL].order = seriesMap[seriesURL].map(
|
||||
(item) => item.url
|
||||
(item) => item.url,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ export interface DataToPass {
|
|||
*/
|
||||
export async function recursiveParse(
|
||||
mode: ParseMode,
|
||||
path: string
|
||||
path: string,
|
||||
): Promise<void> {
|
||||
// get name of the file or folder that's currently being parsed
|
||||
const fileOrFolderName = path2FileOrFolderName(path)
|
||||
|
@ -78,7 +78,7 @@ async function parseFile(mode: ParseMode, path: string): Promise<void> {
|
|||
275,
|
||||
12,
|
||||
500,
|
||||
["img", "Image"]
|
||||
["img", "Image"],
|
||||
)
|
||||
|
||||
const dataToPass: DataToPass = {
|
||||
|
|
|
@ -71,6 +71,6 @@ export default async function parsePost(data: DataToPass): Promise<void> {
|
|||
JSON.stringify({
|
||||
content: markdownData.content,
|
||||
toc: await generateToc(markdownRaw),
|
||||
})
|
||||
}),
|
||||
)
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ export default async function parseProjects({
|
|||
hex: color.toHexString(),
|
||||
isDark: color.isDark(),
|
||||
title: icon.title,
|
||||
})
|
||||
}),
|
||||
)
|
||||
})
|
||||
}
|
||||
|
@ -52,6 +52,6 @@ export default async function parseProjects({
|
|||
JSON.stringify({
|
||||
content: markdownData.content,
|
||||
toc: await generateToc(markdownRaw),
|
||||
})
|
||||
}),
|
||||
)
|
||||
}
|
||||
|
|
|
@ -110,8 +110,8 @@ export default async function parseSeries(data: DataToPass): Promise<void> {
|
|||
const index = parseInt(
|
||||
_urlPath.slice(
|
||||
_urlPath.lastIndexOf("/") + 1,
|
||||
_urlPath.lastIndexOf("_")
|
||||
)
|
||||
_urlPath.lastIndexOf("_"),
|
||||
),
|
||||
)
|
||||
|
||||
if (isNaN(index))
|
||||
|
@ -142,6 +142,6 @@ export default async function parseSeries(data: DataToPass): Promise<void> {
|
|||
JSON.stringify({
|
||||
content: markdownData.content,
|
||||
toc: await generateToc(markdownRaw),
|
||||
})
|
||||
}),
|
||||
)
|
||||
}
|
||||
|
|
|
@ -12,10 +12,10 @@
|
|||
"@typescript-eslint/eslint-plugin": "^6.15.0",
|
||||
"@typescript-eslint/parser": "^6.15.0",
|
||||
"eslint": "^8.56.0",
|
||||
"eslint-config-prettier": "^8.8.0",
|
||||
"eslint-config-prettier": "^9.1.0",
|
||||
"eslint-config-turbo": "^1.11.2",
|
||||
"eslint-plugin-json": "^3.1.0",
|
||||
"eslint-plugin-prettier": "^4.2.1",
|
||||
"eslint-plugin-prettier": "^5.1.3",
|
||||
"eslint-plugin-simple-import-sort": "^10.0.0",
|
||||
"eslint-plugin-turbo": "^1.11.2",
|
||||
"typescript": "^5.3.3"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue