Page MenuHomePhabricator

Added SCSS-Lint linter
AbandonedPublic

Authored by joshuaspence on Oct 22 2014, 10:40 PM.
Tags
None
Referenced Files
F18349975: D10741.diff
Tue, Aug 26, 7:02 PM
F18255427: D10741.diff
Thu, Aug 21, 11:28 PM
F18110560: D10741.id31316.diff
Mon, Aug 11, 9:00 PM
F18102248: D10741.id25785.diff
Sat, Aug 9, 7:29 PM
F18097838: D10741.id25784.diff
Fri, Aug 8, 3:49 PM
F18093010: D10741.id25784.diff
Thu, Aug 7, 2:41 PM
F18092652: D10741.id.diff
Thu, Aug 7, 12:11 PM
F18092455: D10741.id.diff
Thu, Aug 7, 10:34 AM
Tokens
"Love" token, awarded by danoc.

Details

Reviewers
remon
epriestley
chad
Group Reviewers
Blessed Reviewers
Test Plan

Add the following JSON to your .arclint:

"scss-lint": {
  "type": "scss-lint"
}

Then, add a ruby file with errors, for instance:

.message {
  margin: 0;
  margin: 10px;
}

Run arc lint. It should come up with: "Property margin already defined on line 2"

Diff Detail

Event Timeline

remon retitled this revision from to Added SCSS-Lint linter.
remon updated this object.
remon edited the test plan for this revision. (Show Details)
remon edited edge metadata.
  • You didn't see this.
joshuaspence edited edge metadata.
joshuaspence added inline comments.
src/lint/linter/__tests__/ArcanistLinterTestCase.php
7

We don't want this... the expectation is that scss-lint $SOME_PATH should work regardless of the file extension.

This revision now requires changes to proceed.Dec 30 2014, 12:46 PM

Anyone have an update on this? I'd love to use it in our project.

src/lint/linter/ArcanistSCSSLintLinter.php
12
joshuaspence edited reviewers, added: remon; removed: joshuaspence.

Haven't heard back on this, so commandeering to fix it up a bit.

Sorry for not responding! Is there something you need from me in the diff? I'll be happy to help!

epriestley edited edge metadata.
epriestley added inline comments.
src/lint/linter/ArcanistSCSSLintLinter.php
97

This has the same issue with severity structure discussed elsewhere. In particular, severity and severity.rules will be ignored in .arclint.

See discussion in D12034 for a specific example and how to resolve this issue. See D11657 for general discussion.

This revision now requires changes to proceed.May 27 2015, 2:22 PM

Any plan on taking this issue over? Should I try? This would be pretty usefull for us :)

Is there any solutions for arclint & scss or is this still a valid issue?

@santanaviny

You could use a Script and Regex Linter with config like this:

"stylelint": {
      "type": "script-and-regex",
      "script-and-regex.script": "sh -c 'node ./node_modules/stylelint/bin/stylelint.js \"$0\"  || true'",
      "script-and-regex.regex": "/^(\\h+)(?P<line>\\d+):(?P<char>\\d+)(\\h+)(?P<error>✖)(\\h+)(?P<message>.*)(\\h{1,})(?P<code>.*)$/m",
      "include": "/local\\/assets\\/styles\\/.*\\.scss/i"
    }