Skip to content

W-49 Astro API law, and the rules of W-19, W-39 and W-41 - #68

Merged
VirtualMachinist merged 6 commits into
mainfrom
m3/w49-astro-api
Nov 20, 2026
Merged

VirtualMachinist merged 6 commits into
mainfrom
m3/w49-astro-api

Conversation

@VirtualMachinist

Copy link
Copy Markdown
Member

This adds law W-49, appended under the protocol's rule for new law ids, and gives three existing laws the rules their readers read.

W-49: Astro components use the Astro API correctly

W-49 forbids deprecated Astro APIs, conflicting directives and exports from components.

Field Value
Class astro-site
Severity R
Judged m3
Reader tl: eslint-plugin-astro recommended

Its rules are the 9 non-accessibility rules of eslint-plugin-astro's recommended config:

  • missing-client-only-directive-value
  • no-conflict-set-directives
  • no-deprecated-astro-canonicalurl
  • no-deprecated-astro-fetchcontent
  • no-deprecated-astro-resolve
  • no-deprecated-getentrybyslug
  • no-exports-from-components
  • no-prerender-export-outside-pages
  • no-unused-define-vars-in-style

The Astro presets already enable all nine, and no other law covered them. W-27 is the .astro type check, read by astro check. The .astro twins that prove these rules come with the Astro rules step.

Rules for three laws that listed none

Law Rule
W-19 {tool: dependency-cruiser, name: no-optional-peer-import}. The rule is new in the web-tops/depcruise preset, with tests
W-39 {tool: secretlint, name: "@secretlint/secretlint-rule-preset-recommend"}
W-41 {tool: lock, name: web-tops.lock}

The tool is spelled dependency-cruiser everywhere, matching W-16, W-17 and the report's tool list.

Declared exceptions

File Change
WEB_TOPS.md §8.2 is regenerated from the YAML by webtops laws sync
src/config/profiles.ts, src/config/required.ts and their tests astro-site lists W-49 among its extra laws

🤖 Generated with Claude Code

VirtualMachinist and others added 6 commits November 19, 2026 09:23
laws/W-49.yaml holds the law (astro-site, required, judged in M3), with
the nine eslint-plugin-astro rules its reader will prove: the
deprecated-API rules, no-conflict-set-directives, no-exports-from-
components and the other recommended ones. Section 8.2 is regenerated
from it, and the law count goes from 48 to 49 where it is stated.

Declared exceptions: WEB_TOPS.md (section 5.2 astro-site Extra laws,
8.2 heading and v0.1 line), src/config/profiles.ts (astro-site maps
W-49), src/config/required.ts (LAW_COUNT) and the tests that count laws.
This is a protocol-change.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Each had no rule: W-19 gets the dependency-cruiser preset's
optional-peer rule, W-39 the secretlint recommended preset, and W-41
the lock file. W-39's note that no rule names the scanner is gone.
Section 8.2 is regenerated, and the catalog test lists the two new tool
names.

The W-19 rule name is a proposal: it is to be confirmed with the owner
of the depcruise preset before this merges.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
W-19 named a rule the preset did not have. web-tops/depcruise now forbids an
import of React, react-dom, three or an @react-three package that the package
declares as a peer from anywhere but a react entry or an adapter. A package
that depends on the module directly is not touched. The tool is spelled
dependency-cruiser in the law, as in W-16 and W-17, and its note is gone.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@VirtualMachinist VirtualMachinist added the protocol-change Changes laws, schema, profiles, thresholds, budgets or normative spec text label Nov 20, 2026
@VirtualMachinist
VirtualMachinist merged commit 9905239 into main Nov 20, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

protocol-change Changes laws, schema, profiles, thresholds, budgets or normative spec text

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant