SimenB / stylint

Improve your Stylus code with Stylint
https://simenb.github.io/stylint/
GNU General Public License v2.0
348 stars 61 forks source link

Output completely changes depending on if config file is specified #343

Open Arcanemagus opened 8 years ago

Arcanemagus commented 8 years ago

It seems that if stylint is run on a file not in the current folder the output completely changes depending on whether or not there is a configuration file specified: image

bad.styl:

accent = hlsa(174, 100%, 29%, 0.2)
.test {
    color red
}

.stylintrc:

{
  "brackets": "never",
  "colons": {
    "expect": "always",
    "error": true
  },
  "leadingZero": "never",
  "prefixVarsWithDollar": "always"
}

Note that if you attempt this from the directory bad.styl is in, it will still pick up the config as it has the standard name.

SimenB commented 8 years ago

Probably because of the somewhat dirty lookup in here: https://github.com/SimenB/stylint/blob/master/src/utils/setConfig.js