Skip to content

Commit 1068212

Browse files
committed
chore: run prettier
1 parent d45e475 commit 1068212

File tree

4 files changed

+60
-24
lines changed

4 files changed

+60
-24
lines changed

packages/compiler-core/__tests__/transforms/vIf.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ describe('compiler: v-if', () => {
7878
expect(node.branches[0].children[2].type).toBe(NodeTypes.ELEMENT)
7979
expect((node.branches[0].children[2] as ElementNode).tag).toBe(`p`)
8080
})
81-
81+
8282
test('component v-if', () => {
8383
const { node } = parseWithIfTransform(`<Component v-if="ok"></Component>`)
8484
expect(node.type).toBe(NodeTypes.IF)

packages/compiler-core/src/index.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ export {
4848
trackVForSlotScopes,
4949
trackSlotScopes
5050
} from './transforms/vSlot'
51-
export { transformElement, resolveComponentType, buildProps } from './transforms/transformElement'
51+
export {
52+
transformElement,
53+
resolveComponentType,
54+
buildProps
55+
} from './transforms/transformElement'
5256
export { processSlotOutlet } from './transforms/transformSlotOutlet'
5357
export { generateCodeFrame } from '@vue/shared'

packages/runtime-dom/jsx.d.ts

+53-19
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,15 @@ interface AriaAttributes {
7979
*/
8080
'aria-controls'?: string
8181
/** Indicates the element that represents the current item within a container or set of related elements. */
82-
'aria-current'?: boolean | 'false' | 'true' | 'page' | 'step' | 'location' | 'date' | 'time'
82+
'aria-current'?:
83+
| boolean
84+
| 'false'
85+
| 'true'
86+
| 'page'
87+
| 'step'
88+
| 'location'
89+
| 'date'
90+
| 'time'
8391
/**
8492
* Identifies the element (or elements) that describes the object.
8593
* @see aria-labelledby
@@ -118,7 +126,15 @@ interface AriaAttributes {
118126
*/
119127
'aria-grabbed'?: boolean | 'false' | 'true'
120128
/** Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element. */
121-
'aria-haspopup'?: boolean | 'false' | 'true' | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog'
129+
'aria-haspopup'?:
130+
| boolean
131+
| 'false'
132+
| 'true'
133+
| 'menu'
134+
| 'listbox'
135+
| 'tree'
136+
| 'grid'
137+
| 'dialog'
122138
/**
123139
* Indicates whether the element is exposed to an accessibility API.
124140
* @see aria-disabled.
@@ -228,16 +244,15 @@ interface AriaAttributes {
228244
'aria-valuetext'?: string
229245
}
230246

231-
export interface HTMLAttributes extends AriaAttributes{
232-
233-
domPropsInnerHTML?: string;
247+
export interface HTMLAttributes extends AriaAttributes {
248+
domPropsInnerHTML?: string
234249

235250
class?: any
236251
style?: string | CSSProperties
237252

238253
// Standard HTML Attributes
239254
accesskey?: string
240-
contenteditable?: Booleanish | "inherit"
255+
contenteditable?: Booleanish | 'inherit'
241256
contextmenu?: string
242257
dir?: string
243258
draggable?: Booleanish
@@ -285,7 +300,15 @@ export interface HTMLAttributes extends AriaAttributes{
285300
* Hints at the type of data that might be entered by the user while editing the element or its contents
286301
* @see https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute
287302
*/
288-
inputmode?: 'none' | 'text' | 'tel' | 'url' | 'email' | 'numeric' | 'decimal' | 'search'
303+
inputmode?:
304+
| 'none'
305+
| 'text'
306+
| 'tel'
307+
| 'url'
308+
| 'email'
309+
| 'numeric'
310+
| 'decimal'
311+
| 'search'
289312
/**
290313
* Specify that a standard HTML element should behave like a defined custom built-in element
291314
* @see https://html.spec.whatwg.org/multipage/custom-elements.html#attr-is
@@ -317,8 +340,7 @@ export interface AreaHTMLAttributes extends HTMLAttributes {
317340
target?: string
318341
}
319342

320-
export interface AudioHTMLAttributes extends MediaHTMLAttributes {
321-
}
343+
export interface AudioHTMLAttributes extends MediaHTMLAttributes {}
322344

323345
export interface BaseHTMLAttributes extends HTMLAttributes {
324346
href?: string
@@ -712,8 +734,7 @@ export interface WebViewHTMLAttributes extends HTMLAttributes {
712734
}
713735

714736
export interface SVGAttributes extends AriaAttributes {
715-
716-
domPropsInnerHTML?: string;
737+
domPropsInnerHTML?: string
717738

718739
color?: string
719740
height?: number | string
@@ -736,7 +757,20 @@ export interface SVGAttributes extends AriaAttributes {
736757
'accent-height'?: number | string
737758
accumulate?: 'none' | 'sum'
738759
additive?: 'replace' | 'sum'
739-
'alignment-baseline'?: 'auto' | 'baseline' | 'before-edge' | 'text-before-edge' | 'middle' | 'central' | 'after-edge' | 'text-after-edge' | 'ideographic' | 'alphabetic' | 'hanging' | 'mathematical' | 'inherit'
760+
'alignment-baseline'?:
761+
| 'auto'
762+
| 'baseline'
763+
| 'before-edge'
764+
| 'text-before-edge'
765+
| 'middle'
766+
| 'central'
767+
| 'after-edge'
768+
| 'text-after-edge'
769+
| 'ideographic'
770+
| 'alphabetic'
771+
| 'hanging'
772+
| 'mathematical'
773+
| 'inherit'
740774
allowReorder?: 'no' | 'yes'
741775
alphabetic?: number | string
742776
amplitude?: number | string
@@ -955,13 +989,13 @@ export interface SVGAttributes extends AriaAttributes {
955989
x?: number | string
956990
xChannelSelector?: string
957991
'x-height'?: number | string
958-
'xlinkActuate'?: string
959-
'xlinkArcrole'?: string
960-
'xlinkHref'?: string
961-
'xlinkRole'?: string
962-
'xlinkShow'?: string
963-
'xlinkTitle'?: string
964-
'xlinkType'?: string
992+
xlinkActuate?: string
993+
xlinkArcrole?: string
994+
xlinkHref?: string
995+
xlinkRole?: string
996+
xlinkShow?: string
997+
xlinkTitle?: string
998+
xlinkType?: string
965999
y1?: number | string
9661000
y2?: number | string
9671001
y?: number | string

packages/server-renderer/src/helpers/ssrRenderAttrs.ts

+1-3
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,7 @@ export function ssrRenderDynamicAttr(
5353
if (isBooleanAttr(attrKey)) {
5454
return value === false ? `` : ` ${attrKey}`
5555
} else if (isSSRSafeAttrName(attrKey)) {
56-
return value === ''
57-
? ` ${attrKey}`
58-
: ` ${attrKey}="${escapeHtml(value)}"`
56+
return value === '' ? ` ${attrKey}` : ` ${attrKey}="${escapeHtml(value)}"`
5957
} else {
6058
console.warn(
6159
`[@vue/server-renderer] Skipped rendering unsafe attribute name: ${attrKey}`

0 commit comments

Comments
 (0)