Skip to content

Commit dc46a04

Browse files
authored
chore: format add experimental-cli option (#336)
1 parent 598ebfb commit dc46a04

File tree

3 files changed

+7
-15
lines changed

3 files changed

+7
-15
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"lint:fix": "pnpm run lint --fix",
2020
"typecheck": "vue-tsc --noEmit",
2121
"release": "bumpp",
22-
"format": "prettier --write --cache ."
22+
"format": "prettier --write --cache . --experimental-cli"
2323
},
2424
"dependencies": {
2525
"@unocss/reset": "^66.5.9",

src/components/Header.vue

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -162,13 +162,7 @@ function resetFiles() {
162162
width="200px"
163163
>
164164
<div flex justify-center>Want to reset the editor ?</div>
165-
<el-button
166-
flex
167-
self-end
168-
size="small"
169-
plain
170-
@click="resetFiles"
171-
>
165+
<el-button flex self-end size="small" plain @click="resetFiles">
172166
Yes
173167
</el-button>
174168
<template #reference>

src/composables/store.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ export const useStore = (initial: Initial) => {
8181
})
8282
const hideFile = !IS_DEV && !userOptions.showHidden
8383

84-
if(pr) useWorker(pr)
84+
if (pr) useWorker(pr)
8585
const [nightly, toggleNightly] = useToggle(false)
8686
const builtinImportMap = computed<ImportMap>(() => {
8787
let importMap = genImportMap(versions, nightly.value)
@@ -266,9 +266,7 @@ export const useStore = (initial: Initial) => {
266266
const { files, addFile } = store
267267

268268
const isRandomFile = (filename: string) =>
269-
![MAIN_FILE, TSCONFIG, IMPORT_MAP, ELEMENT_PLUS_FILE].includes(
270-
filename,
271-
)
269+
![MAIN_FILE, TSCONFIG, IMPORT_MAP, ELEMENT_PLUS_FILE].includes(filename)
272270
for (const filename in files)
273271
if (isRandomFile(filename)) delete files[filename]
274272

@@ -292,13 +290,13 @@ export const useStore = (initial: Initial) => {
292290
}
293291

294292
function useWorker(pr: string) {
295-
const _worker = window.Worker;
293+
const _worker = window.Worker
296294
window.Worker = class extends _worker {
297295
constructor(url: URL | string, options?: WorkerOptions) {
298-
if(typeof url === 'string' && url.includes('vue.worker')) {
296+
if (typeof url === 'string' && url.includes('vue.worker')) {
299297
url = `${url}?pr=${pr}`
300298
}
301-
super(url, options);
299+
super(url, options)
302300
}
303301
}
304302
}

0 commit comments

Comments
 (0)