thewca / worldcubeassociation.org

All of the code that runs on worldcubeassociation.org
https://www.worldcubeassociation.org/
GNU General Public License v3.0
332 stars 176 forks source link

Ruby Sass is being deprecated #3649

Closed UnsolvedCypher closed 5 years ago

UnsolvedCypher commented 5 years ago

Ruby Sass is being deprecated. Places where we still use it:

jfly commented 5 years ago

This is slightly off-topic, but does the WST plan to remain on Bootstrap 3 for a long time, or are there any plans to upgrade to 4 in the future?

We don't have any plans to move off of Bootstrap 3. I'm not opposed to it if someone wants to take it on, but my gut feeling has been that it would be a big project with little reward. However, if it it causing us to be unable to upgrade other key pieces of our stack, then I would definitely say it's worth upgrading or replacing it.

UnsolvedCypher commented 5 years ago

Ok, thanks. Bootstrap 3 shouldn't be a problem for upgrading to sassc.

I'm looking at what needs to be done to move to sass-lint, and that the configuration file can be automatically converted. However, I'm having trouble figuring out where the pre-commit hook ties in with the linter- would you mind pointing me in the right direction?

jfly commented 5 years ago

We use the pre-commit Gem, which has baked in support for scss_lint. See https://github.com/jish/pre-commit#available-checks for more information. I think we'll have to do 1 of 2 things:

  1. Add a custom check to our pre-commit that uses stylelint or sasslint. This should be possible by editing our config/pre_commit.rb file. Then you could remove :scss_lint here
  2. Change the pre-commit gem to support stylelint or sasslint.

2) feels better to me, although might be more work.

UnsolvedCypher commented 5 years ago

I've opened an issue on the pre-commit repo letting them know what the situation is with scss-lint, but I'm not holding my breath for them to come out with a fix. I'm not quite sure what you mean by option 2, are you suggesting that we switch to another gem? Or that we write a plugin for pre-commit?

jfly commented 5 years ago

I'm suggesting that we send in a PR to the pre-commit folks adding support for an alternative to scss-lint.

Could you include a link to that issue you filed?

UnsolvedCypher commented 5 years ago

Sure, here's the link. Their contribution page links to a repo with example plugins and says to open a PR if we wish.

UnsolvedCypher commented 5 years ago

I'm not sure about the pros and cons of this and the effort involved, but overcommit looks like it is a robust and widely used hook manager Gem.