Skip to content
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

Any version of this for slim templates #73

Closed
justin808 opened this issue Apr 5, 2015 · 8 comments
Closed

Any version of this for slim templates #73

justin808 opened this issue Apr 5, 2015 · 8 comments
Labels

Comments

@justin808
Copy link

Has anybody tried to port this to slim?

How easy would it be for this project to support both?

@sds sds added the question label Apr 6, 2015
@sds
Copy link
Owner

sds commented Apr 6, 2015

It would not make sense for haml-lint to support linting Slim templates, as much of the plumbing is built specifically to deal with nuances of HAML.

I've wanted to build slim-lint for a while, but as we are still using HAML templates at Brigade I haven't been able to justify the venture just yet.

@sds sds closed this as completed Apr 6, 2015
@justin808
Copy link
Author

@sds would you use slim on a new project? The only disadvantages I see of slim are

  1. no linter
  2. RubyMine support is a bit buggy compared to haml

Otherwise, it seems superior.

@sds
Copy link
Owner

sds commented Apr 6, 2015

Yes, if given the option I would choose Slim for new projects. Its use of the Temple library was a solid design decision (given my experience diving into the HAML project's code). Granted, HAML works great as well, I just see Slim as more extensible given the framework it was built on top of.

Maybe I'll find some time to spike on a quick proof of concept to get the ball rolling. Given Temple simply returns Sexps, it should be easy to get started with.

@justin808
Copy link
Author

@sds Sweet. You'll be popular!

@deivid-rodriguez
Copy link
Contributor

👍

slim is my personal preference too, but in the last project I started I chose haml just because there's haml-lint.

slim-lint has been on my "personal project candidate list" for a while, so I'll be willing to help if this is actually started and I get some spare time.

@sds
Copy link
Owner

sds commented Apr 20, 2015

Circling back on this: I've thrown together a working Slim linter (creatively named slim-lint), which functions similarly to haml-lint, and is heavily based off its codebase. RuboCop integration seems to be working, but I don't have any large projects using Slim so it's hard to know if I've missed some cases and the linter is noisy. If you do have some large Slim projects, take it for a spin and let me know what you think!

@justin808
Copy link
Author

Will do! 👍

@Vorob-Astronaut
Copy link

@sds 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants