htm
htm copied to clipboard
Hyperscript Tagged Markup: JSX alternative using standard tagged templates, with compiler support.
Is it possible somehow to use the `eslint-plugin-jsx-a11y` plugin or eslint in general with `htm` tagged syntax at all?
For the most part this just works, but functions within tagged markup get weird indent assertions, e.g., ``` ${collection.map((item) => { const { prop1, prop2 } = workWith(item); // eslint:...
I've been using `htm` for a while now (it's awesome btw), every once in a while though I switch back from a project using JSX and end up writing ``...
Example code: ```js import htm from "htm" const e = htm`` // element is not closed ``` Being used to write HTML and not having to close every element (especially...
Consider this sample code, which accidentally omits a closing tag. ```js import htm from 'htm' const h = (type, props, ...children) => ({type, props, children}); const html = htm.bind(h) console.log(JSON.stringify(html`Hello,...
I've started developing using the stand-alone module from `https://unpkg.com/htm/preact/standalone.module.js` but realize that I really need the debugging tools. The [documentation](https://preactjs.com/guide/v10/debugging#installation) says to `import "preact/debug"`, but that's not a valid module...
Consider this sample code, which accidentally omits a closing tag. ```js import htm from 'https://unpkg.com/htm?module' const h = (type, props, ...children) => ({type, props, children}); const html = htm.bind(h) console.log(JSON.stringify(html`Hello,...
## Reproduction With the following code: ``` import htm from "https://unpkg.com/[email protected]/dist/htm.mjs"; import { h } from "https://unpkg.com/[email protected]/dist/preact.mjs"; const html = htm.bind(h); console.log(html`<`) ``` I get a VNode with `.children =...
This PR enhances htm's parser to detect and ignore JS-style comments, similar to JSX. ```js // Multi line html`` ``` Fixes #213
Single line comments in the opening tag seem to break `props` parsing. The rendered `vnode` will only receive an empty object as props. ```jsx html`` ``` **Actual Behavior** ```js //...