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

lsolesen created an issue. See original summary.

shadcn’s picture

We don't have any linter in place right now. But we're looking to add one. Patches welcomed :)

lsolesen’s picture

Hi 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?

shadcn’s picture

Assigned: Unassigned » shadcn
Status: Active » Needs work

This looks good @lsolesen. I'm going to do some work on Radix this weekend and look into this a bit more.

lsolesen’s picture

Ok @arshadcn. This would be a great addition.

lsolesen’s picture

@arshadcn Any progress on this one? Need a pull request with the functionality I've added to the before mentioned theme?

shadcn’s picture

Yes. PR or patch welcome.

lsolesen’s picture

I am working on this right now. There is one rule for SCSS linting I want to discuss.

default.style.scss:91 [W] StringQuotes: Prefer single quoted strings 

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.

lsolesen’s picture

lsolesen’s picture

@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.

lsolesen’s picture

  • arshadcn committed 97921ac on 7.x-3.x
    Merge pull request #15 from lsolesen/lint
    
    Issue #2695995 by lsolesen:...
  • lsolesen committed fd5aeea on 7.x-3.x
    Issue #2695995 by lsolesen: Add linters to establish coding standards