Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change Request: Export JSONRuleDefinition and other types #82

Open
1 task done
mrmckeb opened this issue Feb 25, 2025 · 2 comments · May be fixed by #84
Open
1 task done

Change Request: Export JSONRuleDefinition and other types #82

mrmckeb opened this issue Feb 25, 2025 · 2 comments · May be fixed by #84
Labels
enhancement New feature or request

Comments

@mrmckeb
Copy link

mrmckeb commented Feb 25, 2025

Environment

Local ESLint version: v9.21.0
Global ESLint version: Not found
@eslint/json version: 0.10.0
Node version: v22.11.0
npm version: v10.9.0
Operating System: darwin 24.3.0

What problem do you want to solve?

I was planning to create some custom ESLint JSON rules, but noted that the types are not currently exported.

What do you think is the correct solution?

It would be great to export types to encourage third-party rule creation.

Participation

  • I am willing to submit a pull request for this change.

Additional comments

No response

@mrmckeb mrmckeb added the enhancement New feature or request label Feb 25, 2025
@nzakas
Copy link
Member

nzakas commented Feb 25, 2025

I'm open to this, I'm just not sure the easiest way to do it. Because we are primarily JavaScript with just a bit of TypeScript augmentation, there's no easy way to just say "export this type". If you'd like to dig in and come up with a proposal, we can definitely consider it.

@nzakas nzakas added this to Triage Feb 25, 2025
@github-project-automation github-project-automation bot moved this to Needs Triage in Triage Feb 25, 2025
@nzakas nzakas moved this from Needs Triage to Evaluating in Triage Feb 25, 2025
@mrmckeb mrmckeb linked a pull request Mar 3, 2025 that will close this issue
1 task
@mrmckeb
Copy link
Author

mrmckeb commented Mar 3, 2025

Thanks @nzakas,

I've found that the latest changes, pending release, now include the types in the dist folder - however, they aren't exposed in exports.

I've added that in in PR #84.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Evaluating
Development

Successfully merging a pull request may close this issue.

2 participants