-
-
Notifications
You must be signed in to change notification settings - Fork 681
Documentation for creating custom rules #262
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
Comments
Thank you for this issue! Sure, it will be great if some docs exist. The way to make custom rules is the same as core essentially, but it has additional AST types. The spec of the AST types is here: https://github.com/mysticatea/vue-eslint-parser/blob/master/docs/ast.md There are some
Please see https://github.com/vuejs/eslint-plugin-vue/blob/master/lib/rules/mustache-interpolation-spacing.js as an example. |
ESLint also has a extremely useful page on the subject: https://eslint.org/docs/developer-guide/working-with-rules |
I guess the most valuable thing would be to mention how to easily inspect this custom AST @mysticatea. For regular JavaScript there is an excellent http://astexplorer.net but it's not that obvious how to inspect AST generated by |
I hope that we can add |
That would be cool! 💪 |
@mysticatea |
Hi guys, I just add 'vue-eslint-parser' to my own ast playground, maybe you want to have a look: then click button "+vue/vue-eslint-parser". P.S. this tool is at very early stage, feedbacks are welcome. |
This is really cool @kindy we might even put it in our documentation. It's really helpful 💪 |
Thanks for all your work on this!
I would like to write a custom rule just for our use, but can't seem to find any documentation on how to do so. If it already exists can someone point me in the right direction, otherwise I'd be happy to help create some docs!
The text was updated successfully, but these errors were encountered: