Skip to content

Commit 7c5f572

Browse files
committed
fix: reinstalled prettier plugins as project deps instead of devDependencies
1 parent 02f3e63 commit 7c5f572

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@
8484
"nock": "^13.3.0",
8585
"posthog-js": "^1.204.0",
8686
"prettier": "3.0.3",
87+
"prettier-plugin-go-template": "^0.0.15",
88+
"prettier-plugin-rust": "^0.1.9",
8789
"react": "^16.12.0",
8890
"react-dom": "^16.12.0",
8991
"react-dropzone": "^14.2.3",
@@ -214,8 +216,6 @@
214216
},
215217
"devDependencies": {
216218
"@types/react-syntax-highlighter": "^15.5.13",
217-
"cypress": "^13.6.3",
218-
"prettier-plugin-go-template": "^0.0.15",
219-
"prettier-plugin-rust": "^0.1.9"
219+
"cypress": "^13.6.3"
220220
}
221221
}

src/helpers/codeFormatter.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ export const formatCodeWithPrettier = (code: string, language = 'javascript') =>
3030
const cleanedCode = code.trim();
3131
if (!cleanedCode) return code;
3232

33-
const normalizedLang = language.charAt(0).toUpperCase() + language.slice(1).toLowerCase();
34-
const config = parserMap[normalizedLang] || parserMap.javaScript;
33+
const config = parserMap[language] || parserMap.javaScript;
3534

3635
return prettier.format(cleanedCode, {
3736
parser: config.parser,

0 commit comments

Comments
 (0)