Closed hejmartin closed 8 years ago
@hejmartin Thank you for your report. If we can set option for the path of stylelint configuration file in the option of stylefmt, I think that it seems work well.
@hejmartin Just released v3.5.0 that includes --config
option to specify the path of stylelint configration file. Please update and confirm it :)
@morishitter Nice! Seems to be mostly working, but I noticed that if I have an "extends"-declaration in one file, and an indentation rule in the file I'm extending, the indendation rule will not be applied.
// This is the file I'm passing in via the config param
{
"extends": "../../.stylelintrc.json",
"rules": {
"selector-pseudo-element-colon-notation": null,
"declaration-colon-space-after": null
}
}
// This is the extended file
{
"rules": {
"indendation": "tab" // This will not be applied
}
}
Instead, stylefmt will use the default of two spaces for indentation.
@morishitter This seems to be true for other rules as well, such as string-quotes
. I can work around it by copying rules from my base config file, but it would be nice if it worked.
I have a project where new css code shares repo with legacy code. I have the need to specify two different grunt tasks with different
.stylelintrc.json
files for linting, as the new code has stricter lint rules than the old code.This is possible in stylelint by using the
configFile
option, but as far as I can tell stylefmt has no option for this. Is it something that could be added in a future release?This is how my gruntfile looks at the moment: