prettier / plugin-ruby

Prettier Ruby Plugin
MIT License
1.46k stars 97 forks source link

Lint Slim #1303

Closed phoet closed 1 year ago

phoet commented 1 year ago

I saw that the plugin can lint .haml files using the syntax_tree-haml gem. I assume there is no alternative for slim templates? I've recently had a look if there is anything providing auto-formating for slim, but only found slim-lint which unfortunately does not offer such a functionality.

What would need to be done to add slim? Pointers appreciated.

kddnewton commented 1 year ago

So do you mean linting or do you mean formatting? Assuming you mean formatting, yeah that doesn't exist at the moment. It would require a couple of steps. Here's a bit of a roadmap:

Best of luck! I'll be happy to include it in the ruby-syntax-tree GitHub org once you get started, or you could keep it on your own.

phoet commented 1 year ago

in case anyone is interested, i started to play around with it here https://github.com/phoet/syntax_tree-slim/blob/main/test/syntax_tree/slim_test.rb#L27-L61