Skip to content

spec(public-component-api): INV23's gap note names the lint that now runs - #9237

Merged
cixzhang merged 4 commits into
mainfrom
spec/inv23-lint-gap
Nov 1, 2026
Merged

cixzhang merged 4 commits into
mainfrom
spec/inv23-lint-gap

Conversation

@cixzhang

@cixzhang cixzhang commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Maintainer impact

The private-attribute lint now runs, so the INV23 known-gaps note no longer says it doesn't exist. Factual update only; no rule changes.

Decision

Consistency edit: INV23's known-gaps bullet now says the @astryx/no-raw-private-attribute rule runs with a baseline of the sites that predate it, and that no owner module exists yet.

Writing rubric results

  • R1 narration: none; the bullet states the current state.
  • R2 research in the record: none.
  • R3 evidence naming a change: none.
  • R4 rejected alternatives over one line or outside a decision: none.
  • R5 pull request or issue references remaining: none.
  • R6 open questions with answers still listing options: none.

@vercel

vercel Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Ready Ready Preview Nov 1, 2026 1:33am UTC

Request Review

@cixzhang

cixzhang commented Nov 1, 2026

Copy link
Copy Markdown
Contributor Author

/approve-spec 0ed6dc1

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 1, 2026
@astracat-bot

astracat-bot Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 1, 2026, 1:35 AM UTC

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The INV23 gap note's update saying the lint now runs is accurate, but two wording fixes are needed before approval. The new clause "each baselined site conforms by moving into its owner module" does not hold for the baselined Lab Schedule site, which reads Core's data-astryx-popover-fallback-close: INV23 forbids importing another package's owner module, and the bullet's last sentence already gives that site a different path, so drop the clause or point to the paths below. Removing "public-API review is the check" also leaves the rule's own blind spots unnamed (Changesets, and names built with + or read through element.dataset), so keep a short clause saying public-API review covers them.

[Automated review]

Comment on lines +399 to +400
the sites that predate it, and no owner module exists yet; each baselined
site conforms by moving into its owner module. The `data-astryx-press` selector is copied in 14 Core files.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This clause doesn't hold for every baselined site. packages/lab/src/Schedule/useScheduleViewPopover.ts is in the baseline and reads Core's data-astryx-popover-fallback-close. INV23 forbids importing another package's owner module, and the last sentence of this bullet already says that site conforms through Core's public API or an attribute Lab owns. Consider dropping the clause, or writing "each baselined site conforms as described below".

@github-actions

github-actions Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · 87cd067

Storybook · Sandbox · built from this PR's head

Package size: no published package changed; no new dependencies.

Not run on this PR: add ci:run-visual, ci:run-a11y or ci:run-rtl to run them.


Generated by PR Enrichment workflow | View full report

@cixzhang

cixzhang commented Nov 1, 2026

Copy link
Copy Markdown
Contributor Author

/approve-spec 61c6629

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The lint-status update is accurate and the earlier conformance clause is gone, but one wording fix is still needed. INV23 bars private attributes from .doc.mjs files, and the ESLint config ignores every .mjs file outside packages/cli, so the rule never reaches component docs; ClickableCard, SelectableCard and Thumbnail docs name data-astryx-press today. Please list .doc.mjs files beside Changesets in the new clause. While there, match the rule's own limitations note: 'data-astryx-' + name is already reported, while names assembled from the namespace with +, or reached through a member access or aliased import in a template, are not.

[Automated review]

Comment on lines +399 to +401
the sites that predate it, and no owner module exists yet; public-API review
covers what the rule cannot see (Changesets, and names built with `+` or read
through `element.dataset`). The `data-astryx-press` selector is copied in 14 Core files.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This list of what the rule cannot see leaves out .doc.mjs files. INV23 bars private attributes from them, but eslint.config.js ignores **/*.mjs outside packages/cli, so the rule never lints them. A data-astryx-press selector that fails lint in a .ts file is skipped in a .doc.mjs one, and ClickableCard.doc.mjs, SelectableCard.doc.mjs and Thumbnail.doc.mjs name data-astryx-press today. Suggested wording:

public-API review covers what the rule cannot see: Changesets and `.doc.mjs`
files, which lint does not reach, and names assembled from the namespace with
`+`, built in a template through a member access or aliased import, or read
through `element.dataset`.

@cixzhang

cixzhang commented Nov 1, 2026

Copy link
Copy Markdown
Contributor Author

/approve-spec 90961ca

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The lint-status update and the new .doc.mjs item are accurate, but one wording fix is still needed. The rewritten list of what the rule cannot see drops element.dataset, which the rule's own limitations note (no-raw-private-attribute.js:42-47) names and which lint does not report, whether read or written; it also leaves out templates built from classPrefix. Please add both, for example: "names assembled from the namespace with + or reached in a template through anything but dataAttrNamespace or NAMESPACE (a member access, an aliased import, classPrefix), and names read or written through element.dataset."

[Automated review]

Comment on lines +400 to +402
covers what the rule cannot see: Changesets, component `.doc.mjs` files (the
lint does not reach them), and names assembled from the namespace with `+` or
reached through a member access or aliased import in a template. The `data-astryx-press` selector is copied in 14 Core files.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This list now reads as complete, but it drops element.dataset, which the previous wording named. The rule's limitations note (internal/eslint-plugin-astryx/no-raw-private-attribute.js:42-47) says the lint does not see a name read through element.dataset, nor a template that reaches the namespace through any identifier other than dataAttrNamespace or NAMESPACE (it names classPrefix), and that public-API review covers them; el.dataset.astryxPress = 'on' and `data-${classPrefix}-press` both pass strict lint on this head. Suggested wording:

names assembled from the namespace with `+` or reached in a template through
anything but `dataAttrNamespace` or `NAMESPACE` (a member access, an aliased
import, `classPrefix`), and names read or written through `element.dataset`.

@cixzhang

cixzhang commented Nov 1, 2026

Copy link
Copy Markdown
Contributor Author

/approve-spec 87cd067

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The INV23 gap note now matches what the @astryx/no-raw-private-attribute lint does, and this looks good to merge once required checks pass. The rule runs with its baseline, every form the note hands to public-API review (Changesets, .doc.mjs files, + and non-namespace template names, element.dataset reads and writes) passes strict lint on this head, and the earlier element.dataset and classPrefix omission is fixed. One optional follow-up outside this pull request: a dataAttr call through an aliased import (import {dataAttr as attr}) also slips past the rule, so its own limitations note could name it.

[Automated review]

@cixzhang
cixzhang merged commit 4265bc4 into main Nov 1, 2026
51 checks passed
@github-actions
github-actions Bot deleted the spec/inv23-lint-gap branch November 1, 2026 06:05

This branch was successfully deployed

1 active deployment
Preview — 87cd0679 Deployed Nov 1, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant