-
Notifications
You must be signed in to change notification settings - Fork 33
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
ESLint plugin/rule #323
Comments
Hey @webberwang I don't think so unfortunately. Eslint doesn't support AST for JSON. Do you have any ideas for that? |
https://github.com/leo-buneev/eslint-plugin-md solves this by having its own parser (https://www.npmjs.com/package/markdown-eslint-parser) that generates an "empty" AST to fool eslint, but adds an extra property with the content of the Markdown file. Then they have a rule (https://github.com/leo-buneev/eslint-plugin-md/blob/master/lib/rules/remark.js#L82), that reads that content from the "fake" AST, and calls I think a similar system could work? I'll experiment with that idea and raise a PR if it ends up working. |
I don't know anything about it but I had read something about eslint & AST and how to extend it in the typescript-eslint repo |
Hey, first time here, thank you for creating this project! ❤️ I found this JSON parser that supports AST https://github.com/ota-meshi/jsonc-eslint-parser. It might be awesome if we could integrate the rules into ESLint. |
FWIW I'm a maintainer on https://github.com/JoshuaKGoldberg/eslint-plugin-package-json now and would love to unify these tools. It's been a consistent user pain with devs I've talked to how there are so many different tools for linting various areas of code. Getting to unify within ESLint (especially considering eslint/eslint#16557) would be very nice. @tclindner I couldn't find an email / other contact for you online, but I'd love to chat! Tracking refs on my end: JoshuaKGoldberg/eslint-plugin-package-json#28 -> JoshuaKGoldberg/create-typescript-app#839 |
Is there a possibility to make this package an ESLint plugin or rule?
The text was updated successfully, but these errors were encountered: