Closed r7kamura closed 1 year ago
This seems awesome! I only recently started trying to contribute to erb-lint
with https://github.com/Shopify/erb-lint/pull/268, but I was wondering the whole time why erb-lint
isn't just a part of rubocop
. Then it could maybe leverage rubocop
s existing caching. Does your solution allow that?
Yes, I think RuboCop's file cache will work well for ERB templates once this template support feature is merged. (I'm not sure if it's really working right now, so I'll have to look into it further)
However, just to be clear, it does not replace all the features of erb-lint, but only those about RuboCop. So, if we want to lint the syntactic part of ERB (e.g. if there is a newline at the end of the ERB file), we will still use erb-lint, and it would be better to have file cache feature at https://github.com/Shopify/erb-lint/pull/268 to improve speed there.
I'm going to close this issue as it has done its purpose. Thank you for feedback 👍
About
We are now working on adding an API to RuboCop to support templates like ERB, Haml and Slim.
I believe erb_lint is also working on the same goal for eRuby templates in its Rubocop Linter feature. If you don't mind, would you care to share some thoughts on the API we are trying to add?
Schedule
I hope to finish collecting feedback by November 30, 2022, and then release the API (maybe in January 2023 or so).
Related Issues