Skip to content

Commit 623ba51

Browse files
committed
chore: format code
1 parent 3be4e3c commit 623ba51

File tree

8 files changed

+24
-16
lines changed

8 files changed

+24
-16
lines changed

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
"size-baseline": "node scripts/build.js vue -f esm-bundler-runtime && node scripts/build.js runtime-dom runtime-core reactivity shared -f esm-bundler && cd packages/size-check && vite build && node brotli",
1313
"check": "tsc --incremental --noEmit",
1414
"lint": "eslint --cache --ext .ts packages/*/{src,__tests__}/**.ts",
15-
"format": "prettier --write --cache --parser typescript \"**/*.[tj]s?(x)\"",
16-
"format-check": "prettier --check --cache --parser typescript \"**/*.[tj]s?(x)\"",
15+
"format": "prettier --write --cache \"**/*.[tj]s?(x)\"",
16+
"format-check": "prettier --check --cache \"**/*.[tj]s?(x)\"",
1717
"test": "vitest",
1818
"test-unit": "vitest -c vitest.unit.config.ts",
1919
"test-e2e": "node scripts/build.js vue -f global -d && vitest -c vitest.e2e.config.ts",
@@ -84,7 +84,7 @@
8484
"marked": "^4.0.10",
8585
"minimist": "^1.2.0",
8686
"npm-run-all": "^4.1.5",
87-
"prettier": "^2.7.1",
87+
"prettier": "^3.0.1",
8888
"pug": "^3.0.1",
8989
"puppeteer": "~19.6.0",
9090
"rollup": "^3.26.0",

packages/compiler-sfc/src/script/importUsageCheck.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,11 @@ function resolveTemplateUsageCheckString(sfc: SFCDescriptor) {
6363
)}`
6464
}
6565
}
66-
if (prop.type === NodeTypes.ATTRIBUTE && prop.name === 'ref' && prop.value?.content) {
66+
if (
67+
prop.type === NodeTypes.ATTRIBUTE &&
68+
prop.name === 'ref' &&
69+
prop.value?.content
70+
) {
6771
code += `,${prop.value.content}`
6872
}
6973
}

packages/dts-test/setupHelpers.test-d.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,8 @@ describe('defineProps w/ union type declaration + withDefaults', () => {
100100
)
101101
})
102102

103-
describe('defineProps w/ generic type declaration + withDefaults', <T extends number, TA extends {
103+
describe('defineProps w/ generic type declaration + withDefaults', <T extends
104+
number, TA extends {
104105
a: string
105106
}, TString extends string>() => {
106107
const res = withDefaults(
@@ -117,10 +118,10 @@ describe('defineProps w/ generic type declaration + withDefaults', <T extends nu
117118
n: 123,
118119

119120
generic1: () => [123, 33] as T[],
120-
generic2: () => ({ x: 123 } as { x: T }),
121+
generic2: () => ({ x: 123 }) as { x: T },
121122

122123
generic3: () => 'test' as TString,
123-
generic4: () => ({ a: 'test' } as TA)
124+
generic4: () => ({ a: 'test' }) as TA
124125
}
125126
)
126127

packages/reactivity/src/ref.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,10 @@ class RefImpl<T> {
138138
public dep?: Dep = undefined
139139
public readonly __v_isRef = true
140140

141-
constructor(value: T, public readonly __v_isShallow: boolean) {
141+
constructor(
142+
value: T,
143+
public readonly __v_isShallow: boolean
144+
) {
142145
this._rawValue = __v_isShallow ? value : toRaw(value)
143146
this._value = __v_isShallow ? value : toReactive(value)
144147
}

packages/runtime-core/__tests__/apiOptions.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ describe('api: options', () => {
382382
render() {
383383
return this[injectedKey]
384384
}
385-
} as any)
385+
}) as any
386386

387387
const ChildA = defineChild(['a'], 'a')
388388
const ChildB = defineChild({ b: 'a' })

packages/runtime-core/__tests__/rendererTemplateRef.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ describe('api: template refs', () => {
116116
const toggle = ref(true)
117117

118118
const Comp = defineComponent(
119-
() => () => toggle.value ? h('div', { ref: fn }) : null
119+
() => () => (toggle.value ? h('div', { ref: fn }) : null)
120120
)
121121
render(h(Comp), root)
122122
expect(fn.mock.calls[0][0]).toBe(root.children[0])

packages/runtime-core/src/components/Teleport.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ function hydrateTeleport(
400400
// Force-casted public typing for h and TSX props inference
401401
export const Teleport = TeleportImpl as unknown as {
402402
__isTeleport: true
403-
new(): {
403+
new (): {
404404
$props: VNodeProps & TeleportProps
405405
$slots: {
406406
default(): VNode[]

pnpm-lock.yaml

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)