Skip to content

Conversation

@lumirlumir
Copy link
Member

@lumirlumir lumirlumir commented Nov 17, 2025

Prerequisites checklist

What is the purpose of this pull request?

In this PR, I've resolved the issue metioned in #310.

I've updated the data property to accept string | number | boolean | bigint | null | undefined and added test cases to ensure it works.

What changes did you make? (Give an overview)

In this PR, I've resolved the issue metioned in #310.

Related Issues

Closes: #310

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

N/A

@github-project-automation github-project-automation bot moved this to Needs Triage in Triage Nov 17, 2025
@eslint-github-bot eslint-github-bot bot added the bug Something isn't working label Nov 17, 2025
@lumirlumir lumirlumir moved this from Needs Triage to Implementing in Triage Nov 17, 2025
@lumirlumir lumirlumir moved this from Implementing to Needs Triage in Triage Nov 20, 2025
@lumirlumir lumirlumir marked this pull request as ready for review November 20, 2025 14:01
@lumirlumir lumirlumir requested a review from a team November 20, 2025 14:02
* The data to insert into the message.
*/
data?: Record<string, unknown> | undefined;
data?:

Choose a reason for hiding this comment

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

I think rather than the note, we should use a type alias to make sure they are in sync:
type MessagePlaceholderData = Record<string, string | number | boolean | bigint | null | undefined> and then reference them for the root and suggestions.

Copy link
Member Author

@lumirlumir lumirlumir Nov 21, 2025

Choose a reason for hiding this comment

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

Yes — this approach makes sense to me as well.

I also checked eslint’s types, and it looks like there are two other places this type could be reused:

So maybe define a reusable type like the following, export it, and apply it in eslint once a new version of @eslint/core is released?

export type MessagePlaceholderData = Record<string, string | number | boolean | bigint | null | undefined> | undefined;

Any further thoughts on this @eslint/eslint-team ?


If this approach and the type name look reasonable, I can go ahead and open a PR in eslint for this change.

@lumirlumir lumirlumir moved this from Needs Triage to Implementing in Triage Nov 21, 2025
@lumirlumir lumirlumir requested a review from a team November 21, 2025 14:36
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

Projects

Status: Implementing

Development

Successfully merging this pull request may close these issues.

Change Request: Make the data property stricter

3 participants