]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
chore: run prettier
authorEvan You <yyx990803@gmail.com>
Wed, 15 Apr 2020 14:51:07 +0000 (10:51 -0400)
committerEvan You <yyx990803@gmail.com>
Wed, 15 Apr 2020 14:51:07 +0000 (10:51 -0400)
packages/compiler-core/__tests__/transforms/vIf.spec.ts
packages/compiler-core/src/index.ts
packages/runtime-dom/jsx.d.ts
packages/server-renderer/src/helpers/ssrRenderAttrs.ts

index 0513ff4e33586f4b9ebbd055b7deaf6bc98afaa6..0ded2ac20671507c8ea4b117829a9a40c1fce7f9 100644 (file)
@@ -78,7 +78,7 @@ describe('compiler: v-if', () => {
       expect(node.branches[0].children[2].type).toBe(NodeTypes.ELEMENT)
       expect((node.branches[0].children[2] as ElementNode).tag).toBe(`p`)
     })
-  
+
     test('component v-if', () => {
       const { node } = parseWithIfTransform(`<Component v-if="ok"></Component>`)
       expect(node.type).toBe(NodeTypes.IF)
index 432492aa2a9856dc383fcd5f66d3d29817d30d25..ba2587fdd74588bd48614819f35b65942600c949 100644 (file)
@@ -48,6 +48,10 @@ export {
   trackVForSlotScopes,
   trackSlotScopes
 } from './transforms/vSlot'
-export { transformElement, resolveComponentType, buildProps } from './transforms/transformElement'
+export {
+  transformElement,
+  resolveComponentType,
+  buildProps
+} from './transforms/transformElement'
 export { processSlotOutlet } from './transforms/transformSlotOutlet'
 export { generateCodeFrame } from '@vue/shared'
index cdf6f409d227708d6412329ddc504912e4661980..8748c4f661f1e056776ca981b004a5cad50e9bea 100644 (file)
@@ -79,7 +79,15 @@ interface AriaAttributes {
    */
   'aria-controls'?: string
   /** Indicates the element that represents the current item within a container or set of related elements. */
-  'aria-current'?: boolean | 'false' | 'true' | 'page' | 'step' | 'location' | 'date' | 'time'
+  'aria-current'?:
+    | boolean
+    | 'false'
+    | 'true'
+    | 'page'
+    | 'step'
+    | 'location'
+    | 'date'
+    | 'time'
   /**
    * Identifies the element (or elements) that describes the object.
    * @see aria-labelledby
@@ -118,7 +126,15 @@ interface AriaAttributes {
    */
   'aria-grabbed'?: boolean | 'false' | 'true'
   /** Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element. */
-  'aria-haspopup'?: boolean | 'false' | 'true' | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog'
+  'aria-haspopup'?:
+    | boolean
+    | 'false'
+    | 'true'
+    | 'menu'
+    | 'listbox'
+    | 'tree'
+    | 'grid'
+    | 'dialog'
   /**
    * Indicates whether the element is exposed to an accessibility API.
    * @see aria-disabled.
@@ -228,16 +244,15 @@ interface AriaAttributes {
   'aria-valuetext'?: string
 }
 
-export interface HTMLAttributes extends AriaAttributes{
-
-  domPropsInnerHTML?: string;
+export interface HTMLAttributes extends AriaAttributes {
+  domPropsInnerHTML?: string
 
   class?: any
   style?: string | CSSProperties
 
   // Standard HTML Attributes
   accesskey?: string
-  contenteditable?: Booleanish | "inherit"
+  contenteditable?: Booleanish | 'inherit'
   contextmenu?: string
   dir?: string
   draggable?: Booleanish
@@ -285,7 +300,15 @@ export interface HTMLAttributes extends AriaAttributes{
    * Hints at the type of data that might be entered by the user while editing the element or its contents
    * @see https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute
    */
-  inputmode?: 'none' | 'text' | 'tel' | 'url' | 'email' | 'numeric' | 'decimal' | 'search'
+  inputmode?:
+    | 'none'
+    | 'text'
+    | 'tel'
+    | 'url'
+    | 'email'
+    | 'numeric'
+    | 'decimal'
+    | 'search'
   /**
    * Specify that a standard HTML element should behave like a defined custom built-in element
    * @see https://html.spec.whatwg.org/multipage/custom-elements.html#attr-is
@@ -317,8 +340,7 @@ export interface AreaHTMLAttributes extends HTMLAttributes {
   target?: string
 }
 
-export interface AudioHTMLAttributes extends MediaHTMLAttributes {
-}
+export interface AudioHTMLAttributes extends MediaHTMLAttributes {}
 
 export interface BaseHTMLAttributes extends HTMLAttributes {
   href?: string
@@ -712,8 +734,7 @@ export interface WebViewHTMLAttributes extends HTMLAttributes {
 }
 
 export interface SVGAttributes extends AriaAttributes {
-
-  domPropsInnerHTML?: string;
+  domPropsInnerHTML?: string
 
   color?: string
   height?: number | string
@@ -736,7 +757,20 @@ export interface SVGAttributes extends AriaAttributes {
   'accent-height'?: number | string
   accumulate?: 'none' | 'sum'
   additive?: 'replace' | 'sum'
-  'alignment-baseline'?: 'auto' | 'baseline' | 'before-edge' | 'text-before-edge' | 'middle' | 'central' | 'after-edge' | 'text-after-edge' | 'ideographic' | 'alphabetic' | 'hanging' | 'mathematical' | 'inherit'
+  'alignment-baseline'?:
+    | 'auto'
+    | 'baseline'
+    | 'before-edge'
+    | 'text-before-edge'
+    | 'middle'
+    | 'central'
+    | 'after-edge'
+    | 'text-after-edge'
+    | 'ideographic'
+    | 'alphabetic'
+    | 'hanging'
+    | 'mathematical'
+    | 'inherit'
   allowReorder?: 'no' | 'yes'
   alphabetic?: number | string
   amplitude?: number | string
@@ -955,13 +989,13 @@ export interface SVGAttributes extends AriaAttributes {
   x?: number | string
   xChannelSelector?: string
   'x-height'?: number | string
-  'xlinkActuate'?: string
-  'xlinkArcrole'?: string
-  'xlinkHref'?: string
-  'xlinkRole'?: string
-  'xlinkShow'?: string
-  'xlinkTitle'?: string
-  'xlinkType'?: string
+  xlinkActuate?: string
+  xlinkArcrole?: string
+  xlinkHref?: string
+  xlinkRole?: string
+  xlinkShow?: string
+  xlinkTitle?: string
+  xlinkType?: string
   y1?: number | string
   y2?: number | string
   y?: number | string
index d17c0dd11d63721d34e44858f6eb97bb48b63a86..958e470805c5fc7a6d19bda02a6b8901d3aa9095 100644 (file)
@@ -53,9 +53,7 @@ export function ssrRenderDynamicAttr(
   if (isBooleanAttr(attrKey)) {
     return value === false ? `` : ` ${attrKey}`
   } else if (isSSRSafeAttrName(attrKey)) {
-    return value === ''
-      ? ` ${attrKey}`
-      : ` ${attrKey}="${escapeHtml(value)}"`
+    return value === '' ? ` ${attrKey}` : ` ${attrKey}="${escapeHtml(value)}"`
   } else {
     console.warn(
       `[@vue/server-renderer] Skipped rendering unsafe attribute name: ${attrKey}`