Conversation
Lint diagnostics are OXC.Diagnostic maps, and lint plugin, environment, and global names are strings. Type-aware checks extract component scripts with the configured Volt plugins.
The dev server keeps the current errors per session, replays them to clients that connect, and adds the HMR client to rendered HTML pages so the overlay still appears when a page's module graph fails to load. The overlay shows file, line, column, and a source frame, hides once errors are fixed, and the page reloads after the HMR connection returns.
Rebased onto Volt 0.19: batches group files by the rules OXC.Lint.type_aware_rules/1 resolves, without a category list here. Co-authored-by: Danila Poyarkov <dev@dannote.net>
The page showed through the translucent backdrop and competed with the error text.
With Lumis and a parser package for the file's language, error entries carry frame_html: the whole file is highlighted so multi-line tokens keep their colors, and the frame keeps Volt's gutter, marker, and caret. Without them the frame stays plain text.
A deep purple panel with the logo's purple-to-cyan gradient bar, the drop and bolt mark in the header, and matching frame colors.
… lit-html mix volt.priv.vendor installs the packages a priv package.json lists and keeps only the files the sources reach, so they ship in the Hex package. Volt.Priv.bundle!/3 bundles a priv entry with them. The error overlay is a <volt-error-overlay> element rendered with lit-html into a Shadow DOM, so app styles cannot affect it, and it no longer shows the logo.
priv/ts/node_modules is ignored. mix setup, CI, and hex.build and hex.publish vendor it, and Volt.Priv.bundle/3 vendors on first use in a git or path checkout. mix volt.priv.vendor drops --check.
Compiling the project to vendor unloads Hex's own modules, so the aliases run mix volt.priv.vendor with cmd.
fix: apply lint categories to type-aware checks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Volt 0.19: moves to
oxc0.18.1,vize0.15,quickbeam0.11.2, andjson_codec0.3, and reworks the development error overlay.oxc 0.18 migration (breaking)
OXC.Diagnosticmaps with:error/:warningseverities and line/column positions. Parse errors are diagnostics too.:plugins,:env, and:globalstake string names, as in an oxlint config. Atom names raise anArgumentError.start/endinstead ofspan, andImports.rewrite!/3raisesOXC.Error."correctness"select (fix: apply lint categories to type-aware checks #41).Error overlay
<volt-error-overlay>renders with lit-html into a Shadow DOM. It shows the file, line, column, a source frame, hint, and stacktrace, and hides once the errors are fixed.lumisdependency and its parser packages.Volt.HMR.error/3accepts messages, exceptions, and diagnostics and takes a:title.Volt.HMR.clear_error/2hides the errors. The page reloads after the HMR connection returns.Browser code with npm packages
mix volt.priv.vendorvendors npm packages forprivbrowser code intopriv/<root>/node_modules, keeping only the files the sources reach. That directory is kept out of git and generated bymix setup, CI, and thehex.build/hex.publishaliases.Volt.Priv.bundle!/3bundles apriventry with the vendored packages, and vendors on first use in a git or path checkout.Testing
mix lintandmix testpass (724 tests).Closes #40.