Repository navigation
W-49 Astro API law, and the rules of W-19, W-39 and W-41 - #68
Merged
Merged
Conversation
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>
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.
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.
astro-sitem3tl: eslint-plugin-astro recommendedIts rules are the 9 non-accessibility rules of
eslint-plugin-astro's recommended config:missing-client-only-directive-valueno-conflict-set-directivesno-deprecated-astro-canonicalurlno-deprecated-astro-fetchcontentno-deprecated-astro-resolveno-deprecated-getentrybyslugno-exports-from-componentsno-prerender-export-outside-pagesno-unused-define-vars-in-styleThe Astro presets already enable all nine, and no other law covered them. W-27 is the
.astrotype check, read byastro check. The.astrotwins that prove these rules come with the Astro rules step.Rules for three laws that listed none
{tool: dependency-cruiser, name: no-optional-peer-import}. The rule is new in theweb-tops/depcruisepreset, with tests{tool: secretlint, name: "@secretlint/secretlint-rule-preset-recommend"}{tool: lock, name: web-tops.lock}The tool is spelled
dependency-cruisereverywhere, matching W-16, W-17 and the report's tool list.Declared exceptions
WEB_TOPS.mdwebtops laws syncsrc/config/profiles.ts,src/config/required.tsand their testsastro-sitelists W-49 among its extra laws🤖 Generated with Claude Code