Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I've just finished my task with updating my theme from Radix 3.0 to Radix 3.3 and I've added a SCSS lint test. There is quite a few issues based on the default SCSS Lint, as you can see here: https://travis-ci.org/vih/sport_2014/jobs/119191430#L1691
It is based on this: https://www.npmjs.com/package/gulp-scss-lint with this default https://github.com/brigade/scss-lint/blob/master/config/default.yml.
It would be interesting to know what Radix follows, so I could use the same linting in my sub theme?
Comments
Comment #2
shadcn CreditAttribution: shadcn at Chapter Three commentedWe don't have any linter in place right now. But we're looking to add one. Patches welcomed :)
Comment #3
lsolesen CreditAttribution: lsolesen commentedHi Arshad,
I've been doing this for linters for my subtheme of Radix 3.3.
https://github.com/vih/sport_2014/blob/7.x-3.x/gulpfile.js
I am using jshint and scss_lint (which is a gem).
Then I can run the linters on .travis.yml --> https://github.com/vih/sport_2014/blob/7.x-3.x/.travis.yml
If you think that this is a good route, I will make a pull request for this functionality?
Comment #4
shadcn CreditAttribution: shadcn at Chapter Three commentedThis looks good @lsolesen. I'm going to do some work on Radix this weekend and look into this a bit more.
Comment #5
lsolesen CreditAttribution: lsolesen commentedOk @arshadcn. This would be a great addition.
Comment #6
lsolesen CreditAttribution: lsolesen commented@arshadcn Any progress on this one? Need a pull request with the functionality I've added to the before mentioned theme?
Comment #7
shadcn CreditAttribution: shadcn at Chapter Three commentedYes. PR or patch welcome.
Comment #8
lsolesen CreditAttribution: lsolesen commentedI am working on this right now. There is one rule for SCSS linting I want to discuss.
SCSS linting by default prefers single quotes, but you use double quotes. Should I change the code to use single quotes, or do you prefer to disable this rule. I think it would make sense just to follow the linting standard without modifications.
Comment #9
lsolesen CreditAttribution: lsolesen commentedInitial work ready here: https://github.com/radixtheme/radix/pull/14.
Comment #10
lsolesen CreditAttribution: lsolesen commented@arshad Automatic testing added for Radix itself. https://travis-ci.org/lsolesen/radix/builds/122188234. If you agree with the approach I will start fixing the linting issues before merging the final pull request.
Comment #11
lsolesen CreditAttribution: lsolesen commentedOpened a new pull request: https://github.com/radixtheme/radix/pull/15