Repository navigation
feat!: spec-generated CSS vocabulary; compiler-backed lint rules - #428
Merged
Merged
Conversation
css-keywords.ts now reads @webref/css, parses each property's value syntax with css-tree, and writes the properties csstype 3.2.3 lacks as SpecificationProperties, layered over csstype; the extractor's keyword table still derives from the public types. Only properties shipping in at least one stable browser (per web-features) are generated: 90, including columnWrap, columnHeight, readingFlow and scrollMarkerGroup. The hand-written cornerShape becomes a generated entry. Type-check cost: instantiations rise 2 to 3 percent and check time on the type-budget fixtures about 9 percent. cornerShape on a strict scale no longer accepts an arbitrary superellipse() string. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The build writes .animus/diagnostics.json and .animus/tokens.json beside prop-order.json. animus/diagnostics-error, -warn and -info report the extractor's located diagnostics; animus/no-raw-token-value replaces a literal equal to exactly one token's value with that token. Each rule reports for a file only while its content hash and the build's witness files still match what was analysed. Breaking: the propOrderFile option is lintFiles, the animus prop-order command is animus lint-files, ExtractionSession.propOrderWrittenTo is lintFilesWrittenTo, and propOrderPath is no longer exported. Verified at this commit: vp run verify:full (55 of 55 tasks); css-keywords.ts --check passes. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
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.
Two changes, one commit each, on top of #427.
CSS vocabulary generated from specification data
packages/extract/scripts/css-keywords.tsreads@webref/css, parses each property's value-definition syntax withcss-tree, and writes the propertiescsstype3.2.3 lacks asSpecificationProperties, layered overcsstype. The extractor's keyword table still derives from the public types, so the two cannot drift.--writeregenerates;--checkfails when either output is stale.columnWrap,columnHeight,readingFlow,scrollMarkerGroupand thecorner*,rule*androwRule*families. A fixture built through the real engine emits the four named properties with zero diagnostics.csstypeinstead of replacing it: replacement would drop every vendor-prefixed property and browser-real keywords the specifications omit.web-features) are generated. Typing all 290 the specifications define raised check time by 37%.packages/extract. Nothing new ships at run time.Cost: instantiations rise 2 to 3%, and check time on the type-budget fixtures about 9%. The cost scales with the number of property keys, through how
PropertyValuesexpands inpackages/core/src/types/config.ts.Extractor diagnostics and token fixes as lint rules
.animus/diagnostics.jsonand.animus/tokens.jsonbesideprop-order.json.animus/diagnostics-error,animus/diagnostics-warnandanimus/diagnostics-inforeport the extractor's located diagnostics at their positions.animus/no-raw-token-valuereplaces a literal that equals exactly one token's value with that token (color: '#171717'becomescolor: 'gray.900'). With several candidates it reports and names them without fixing. A token whose value differs between colour modes never matches.e2e/rollup-appthat, after a build, Oxlint reports the fixture's token miss at its line and column and fixes a raw value to its token.Not built: a rule for unused variant options. The extractor records no file or position for what it eliminates, and does not eliminate unused variant options individually.
Release notes
cornerShapeon a strict scale no longer accepts an arbitrarysuperellipse(...)string.propOrderFileoption islintFilesin every plugin, the CLI config and the core options, and writes three files.animus prop-orderisanimus lint-files.ExtractionSession.propOrderWrittenToislintFilesWrittenTo;propOrderPathis no longer exported from@animus-ui/extract/session.animus/diagnostics-error,animus/diagnostics-warn,animus/diagnostics-info,animus/no-raw-token-value.Verification
vp run verify:fullpasses atf3e2de06: 55 of 55 tasks.css-keywords.ts --checkpasses.verify:bench:build:vite-apppasses (ratio 1.010). The loader and analysis rows still report INVALID for the reason recorded on feat!: structured diagnostics, tighter types, CI hardening #427.🤖 Generated with Claude Code