Skip to content

Conversation

@jaymarvelz
Copy link

@jaymarvelz jaymarvelz commented Oct 25, 2025

Prerequisites checklist

What is the purpose of this pull request?

To correct the JSONRuleVisitor type definitions and improve maintainability by introducing a WithExit helper (copied from eslint/markdown). This ensures :exit selectors are automatically generated for all node types and simplifies visitor type definitions.

What changes did you make? (Give an overview)

  • Added a WithExit<RuleVisitorType> helper type to automatically add :exit variants.
  • Replaced the manually defined JSONRuleVisitor interface with a version using WithExit.

Related Issues

Is there anything you'd like reviewers to focus on?

@eslintbot eslintbot added this to Triage Oct 25, 2025
@github-project-automation github-project-automation bot moved this to Needs Triage in Triage Oct 25, 2025
@fasttime fasttime moved this from Needs Triage to Triaging in Triage Oct 27, 2025
@fasttime fasttime moved this from Triaging to Evaluating in Triage Oct 27, 2025
@jaymarvelz jaymarvelz changed the title refactor: simplify JSONRuleVisitor fix: correct parent typing for rule visitors Oct 29, 2025
@eslint-github-bot eslint-github-bot bot added the bug Something isn't working label Oct 29, 2025
@fasttime fasttime moved this from Evaluating to Implementing in Triage Oct 29, 2025
//------------------------------------------------------------------------------

/** Adds matching `:exit` selectors for all properties of a `RuleVisitor`. */
type WithExit<RuleVisitorType extends RuleVisitor> = {

Choose a reason for hiding this comment

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

I think this should be a shared helper from @eslint/core as all ESLint languages require it.

Copy link
Author

Choose a reason for hiding this comment

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

@github-actions
Copy link
Contributor

github-actions bot commented Nov 8, 2025

Hi everyone, it looks like we lost track of this pull request. Please review and see what the next steps are. This pull request will auto-close in 7 days without an update.

@github-actions github-actions bot added the Stale label Nov 8, 2025
@DMartens DMartens added accepted and removed Stale labels Nov 8, 2025
@nzakas
Copy link
Member

nzakas commented Nov 10, 2025

@jaymarvelz are you still working on this? There are some outstanding comments to respond to.

@lumirlumir lumirlumir self-requested a review November 12, 2025 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

accepted bug Something isn't working chore

Projects

Status: Implementing

Development

Successfully merging this pull request may close these issues.

4 participants