ESlint support ?
kissu opened this issue · comments
Hi !
I do actually use VScode's Headwind
extension to format my classes.
I didn't found a way of doing this with basically any code editor/IDE. I was wondering if it's somehow planned to support formatting through ESlint, that way: my colleagues will have auto-formatted classes whatever the editor.
Hi 👋
I'm sorry to hear that it doesn't work with the editors you/your colleges use.
An eslint plugin wouldn't be too tricky to get created, as the code for sorting tailwind classes is it's own package under tailwind-classes-sorter on NPM.
I don't have a lot of time to work on a new project like that currently, but you or your team are welcome to give it a go, it shouldn't be too tricky.
For now the only thing I can suggest is that they can use this plugin if they use prettier as a cli command, perhaps even as a git hook setup using something like husky.
Alright, will maybe give a try !
Husky is awesome indeed, already formatting some JSON and stuff with it. 👍🏻