chore: bump prettier v3 and format all code (#12111)

* chore: bump prettier v3 and format all code

* chore: mjs config

* chore: revert

* chore: revert

* chore: update lock
This commit is contained in:
neverland
2023-07-22 14:14:14 +08:00
committed by GitHub
parent b601ca1e0b
commit 3dcc92a5c0
209 changed files with 565 additions and 543 deletions
+2 -3
View File
@@ -105,7 +105,7 @@ export function getDeps(filePath: string) {
export function replaceScriptImportExt(
code: string,
filePath: string,
ext: string
ext: string,
) {
const imports = [...matchImports(code), ...matchExportFroms(code)];
@@ -132,7 +132,6 @@ export function replaceScriptImportExt(
return;
}
const pathInfo = getPathByImport(line, filePath);
if (pathInfo) {
@@ -141,7 +140,7 @@ export function replaceScriptImportExt(
if (pathInfo.isIndex) {
const newLine = line.replace(
relativePath,
`${relativePath}/index${ext}`
`${relativePath}/index${ext}`,
);
updateImport(index, newLine);