Skip to content

Commit

Permalink
fix: lint:fix
Browse files Browse the repository at this point in the history
  • Loading branch information
holtwick committed Sep 23, 2024
1 parent db181bf commit 08aaa2b
Show file tree
Hide file tree
Showing 11 changed files with 22 additions and 22 deletions.
8 changes: 4 additions & 4 deletions src/html.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
// 2. Attribute name '__' gets transformed to ':' for namespace emulation
// 3. Emulate CDATA by <cdata> element

import { hArgumentParser } from './h'
import { escapeHTML } from './encoding'
import { hArgumentParser } from './h'
import { hasOwn } from './utils'

export const SELF_CLOSING_TAGS = [
Expand Down Expand Up @@ -43,9 +43,9 @@ export function markup(
const hasChildren = !(
(typeof children === 'string' && children === '')
|| (Array.isArray(children)
&& (children.length === 0
|| (children.length === 1 && children[0] === '')))
|| children == null
&& (children.length === 0
|| (children.length === 1 && children[0] === '')))
|| children == null
)

const parts: string[] = []
Expand Down
2 changes: 1 addition & 1 deletion src/htmlparser.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { VHTMLDocument } from './vdom'
import { VTextNode, createHTMLDocument } from './vdom'
import { createHTMLDocument, VTextNode } from './vdom'
import { parseHTML } from './vdomparser'

describe('htmlparser', () => {
Expand Down
16 changes: 8 additions & 8 deletions src/index.browser.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
export * from './vdom'
export * from './h'
export * from './utils'

export { vdom, parseHTML } from './vdomparser'
export { escapeHTML, unescapeHTML } from './encoding'
export { tidyDOM } from './tidy'
export * from './h'
export { CDATA, html } from './html'
export { xml } from './xml'

export { handleHTML } from './manipulate'
export { serializeMarkdown } from './serialize-markdown'
export { serializePlaintext } from './serialize-plaintext'
export { serializeSafeHTML, safeHTML } from './serialize-safehtml'
export { safeHTML, serializeSafeHTML } from './serialize-safehtml'
export { tidyDOM } from './tidy'
export * from './utils'
export * from './vdom'
export { parseHTML, vdom } from './vdomparser'
export { xml } from './xml'
2 changes: 1 addition & 1 deletion src/node.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { readFileSync, writeFileSync } from 'node:fs'
import type { VHTMLDocument } from './vdom'
import { readFileSync, writeFileSync } from 'node:fs'
import { parseHTML } from './vdomparser'

/** Manipulate HTMl file directly on disk. Only writes back if there were significant changes. */
Expand Down
2 changes: 1 addition & 1 deletion src/serialize-markdown.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { VElement } from './vdom'
import { VNode, isVElement } from './vdom'
import { isVElement, VNode } from './vdom'

interface SerializeContext {
level: number
Expand Down
4 changes: 2 additions & 2 deletions src/serialize-plaintext.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { SELECTOR_BLOCK_ELEMENTS } from './tidy'
import type { VElement } from './vdom'
import { VNode, isVElement } from './vdom'
import { SELECTOR_BLOCK_ELEMENTS } from './tidy'
import { isVElement, VNode } from './vdom'

interface SerializeContext {
level: number
Expand Down
2 changes: 1 addition & 1 deletion src/serialize-safehtml.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { escapeHTML } from './encoding'
import { VNode, isVElement } from './vdom'
import { isVElement, VNode } from './vdom'
import { parseHTML } from './vdomparser'

export const SELECTOR_BLOCK_ELEMENTS = 'p,h1,h2,h3,h4,h5,h6,blockquote,div,ul,ol,li,article,section,footer,nav,hr,form'
Expand Down
2 changes: 1 addition & 1 deletion src/vcss.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { parse } from 'css-what'
import type { VElement } from './vdom'
import { parse } from 'css-what'

function log(..._args: any) {}

Expand Down
2 changes: 1 addition & 1 deletion src/vdom.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// import Sizzle from './sizzle'
import { VDocument, VDocumentFragment, VElement, createHTMLDocument, h } from './vdom'
import { createHTMLDocument, h, VDocument, VDocumentFragment, VElement } from './vdom'
import { parseHTML } from './vdomparser'
import { xml } from './xml'

Expand Down
2 changes: 1 addition & 1 deletion src/vdomparser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { unescapeHTML } from './encoding'
import { SELF_CLOSING_TAGS } from './html'
import { HtmlParser } from './htmlparser'
import { hasOwn } from './utils'
import { VDocType, VDocumentFragment, VElement, VHTMLDocument, VNode, VTextNode, document } from './vdom'
import { document, VDocType, VDocumentFragment, VElement, VHTMLDocument, VNode, VTextNode } from './vdom'

// Makes sure we operate on VNodes
export function vdom(obj: VNode | Buffer | string | null = null): VNode {
Expand Down
2 changes: 1 addition & 1 deletion src/xml.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import './jsx-runtime'
import { hArgumentParser } from './h'
import { markup } from './html'
import './jsx-runtime'

export function xml(itag: string, iattrs?: object, ...ichildren: any[]) {
const { tag, attrs, children } = hArgumentParser(itag, iattrs, ichildren)
Expand Down

0 comments on commit 08aaa2b

Please sign in to comment.