After discussion HTMX has a heap of legacy issues. Most of them around lack of test coverage. Typescript is static test coverage, so typescript. Changing from the JSDoc to actual typescript has made previous warnings into actual errors.
HTMX is great, and want to see it be extended while online paying for what you need. Like it or not its a JS Framework so make it so PRs and extensions can't break everyone as easily. Plus you get an actual build system with multiple targets at no extra cost with source mapping and declaration that match the code.
- Typescript to get actual static analysis in the code. HTMX's function signatures have types, so stop doing inference dance.
- Use prettier, less BS around format bike shedding
- Vite
- tests fast
- live dev server with HMR
- builds production matrix
- rule 7b, showing that things are better for devs if they have better tools, htmx export look mostly the same either way
120 Errors until compiling
- JSDocs are wrong
- .d.ts are incorrect
- config docs don't match codebase
parentElt(el)
andgetDocument()
wrap for no reason- matches needed a type union
- var everywhere instead of let & const
- template literals instead of str concat
- parseHTML fragment seems wrong
- makeFragment is assuming no nulls is querySelector
- processWebSocketInfo... has nodeData but never used
- same with processSSEInfo
- var currentPathForHistory = location.pathname+location.search; only on init?
- saveToHistoryCache getItem is string || null
- substr is deprecated
- oobSwap.parentNode can be null
- attributeHash has a IE fix tag but no explaination
- cleanUpElement can we remove IE fix?
- swapOuterHTML call on parent can be null
- swapDelete call on parent can be null
- querySelectorExt has many fail states
- same with find
- same with findall
- removeElement call possible null and parent
- removeClassFromElement null call
- removeClassFromElement null call
- toggleClassOnElement null call
- takeClassForElement null call
- closest null call
- scanForwardQuery not all paths return
- scanBackwardsQuery not all paths return
- addEventListenerImpl null call
- removeEventListenerImpl null call
- updateScrollState scrolling on document
- updateScrollState scrollIntoView on document
- getValuesForElement is update, poorly named
- issueAjaxRequest promptResponse is at wrong scope
- findAttributeTargets not all paths
- handleTrigger null call
- selectAndSwap null parent call , id null
- isLocalLink null call
- handleAjaxResponse null call
- handleAttributes has task as func, others its call: () => void
- getInputValues null query calls
- swapInnerHTML null call
- maybeCloseWebSocketSource not all paths return
- findTitle not all paths
- maybeCloseSSESource not all paths
- swapDelete params not used
- swapBeforeBegin null parent
- swapAfterBegin null parent
- getExtensions parent null
- loadHistoryFromServer null call
- addRequestIndicatorClasses null call
- init null call
- insertNodesBefore null call
- handleSwap signature makes no sense
- evalScript null parent
- processNode null call
- processSSESwap null call
- processWebSocketSend filteredParameters is a Record everywhere but here, why?
- maybeCloseWebSocketSource not all paths
- triggerEvent null call
- currentPathForHistory is assigned to but never used
- getPathFromResponse not all paths
- querySelectorAllExt so many bad states if anything null
- querySelectorAllExt why window selector? you use as element everywhere
- boostElement null call
- initButtonTracking target null call
- processVerbs null call
- addTriggerHandler why is evt called evt when its an element?