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

🛠 Tooling: replace jsonc-eslint-parser with @eslint/json #655

Open
3 tasks done
rakleed opened this issue Nov 28, 2024 · 5 comments
Open
3 tasks done

🛠 Tooling: replace jsonc-eslint-parser with @eslint/json #655

rakleed opened this issue Nov 28, 2024 · 5 comments
Labels
area: tooling Managing the repository's maintenance status: accepting prs Please, send a pull request to resolve this! type: feature New enhancement or request

Comments

@rakleed
Copy link
Contributor

rakleed commented Nov 28, 2024

Bug Report Checklist

  • I have tried restarting my IDE and the issue persists.
  • I have pulled the latest main branch of the repository.
  • I have searched for related issues and found none that matched my issue.

Overview

As suggested in #601 (comment), I am creating a separate issue to discuss replacing jsonc-eslint-parser dependency with @eslint/json.

@eslint/json is smaller and uses fewer dependencies than jsonc-eslint-parser. The announcement post also says that it can be used as a parser for other plugins.

The main problem is that the plugin only works since version 9.6.0 of ESLint, and you can use only a flat config. So you will have to stop supporting eslint@8, but now it still has more weekly downloads than eslint@9.

Additional Info

No response

@rakleed rakleed added the area: tooling Managing the repository's maintenance label Nov 28, 2024
@JoshuaKGoldberg
Copy link
Owner

Yeah 😞. As much as I'd love to use the new first-party package, I don't think it's time yet to drop support for ESLint 8. Once other popular plugins start to drop support then I think we can mark this as unblocked.

Thanks for filing!

@JoshuaKGoldberg JoshuaKGoldberg added the status: blocked Waiting for something else to be resolved label Nov 28, 2024
@ota-meshi
Copy link
Contributor

Hi there. I've created an experimental tool that converts jsonc-eslint-parser AST processing rules/plugins to be used with @eslint/json.
https://www.npmjs.com/package/eslint-json-compat-utils
Try it out if you want to use eslint-plugin-package-json and @eslint/json together now.

You can find a working example online here.

@JoshuaKGoldberg JoshuaKGoldberg added status: accepting prs Please, send a pull request to resolve this! and removed status: blocked Waiting for something else to be resolved labels Nov 29, 2024
@JoshuaKGoldberg
Copy link
Owner

That's fantastic, thanks @ota-meshi! Marking as accepting PRs to switch this package to using the compat utils.

Note that doing so is probably not a trivial change. It'll probably touch most or all of the rules in the plugin.

@JoshuaKGoldberg
Copy link
Owner

@all-contributors please add @rakleed for tool.

🤖 Beep boop! This comment was added automatically by all-contributors-auto-action.
Not all contributions can be detected from Git & GitHub alone. Please comment any missing contribution types this bot missed.
...and of course, thank you for contributing! 💙

Copy link
Contributor

@JoshuaKGoldberg

I've put up a pull request to add @rakleed! 🎉

JoshuaKGoldberg pushed a commit that referenced this issue Nov 29, 2024
Adds @rakleed as a contributor for tool.

This was requested by JoshuaKGoldberg [in this
comment](#655 (comment))

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
@JoshuaKGoldberg JoshuaKGoldberg added the type: feature New enhancement or request label Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: tooling Managing the repository's maintenance status: accepting prs Please, send a pull request to resolve this! type: feature New enhancement or request
Projects
None yet
Development

No branches or pull requests

3 participants