Open anglepoised opened 8 years ago
Same here, only the first item of the array is used. Probably it's just about updating the readme :)
I wonder if for consistency it should follow the same pattern for options as the core stylelint rules that accept either a string or an array, e.g. function-whitelist
?
Either way, this is a very useful plugin. Thanks, @sh-waqar!
So.. we should just update the readme right?
@rvetere - I already have updated the readme. In commit 5f38e4e584410c4ca7f8d072da12ce481e3b57f3
ah true i see it now - so then close this issue i would say ;) Is there already a new version available with the latest merges? So i could change back to a version in my package.json instead of referencing my github fork ;)
@rvetere - Actually the [[]]
method is just a way around to solve the issue. To make this work as per the stylelint guideline and rule standard I have to update the plugin a little. Refer the issue here: https://github.com/stylelint/stylelint/issues/1579
I am updating the npm package right now. :smile:
The multiple properties example in the README doesn't work for me:
I only get lint results for the first property (in this case,
/color/
). However, if I add another array to the rule:...everything works as expected (i.e. I get lint errors for all properties in the array).
Seems to be the same as at https://github.com/sh-waqar/stylelint-declaration-use-variable/issues/1#issuecomment-222474593. Discovered this while playing around with setting severity to warning, so this is my full, working rule object:
May be something to do with how rule options are determined?
I'm using:
node@5.11.1
stylelint@6.3.3
(also tested withstylelint@6.5.1
)stylelint-declaration-use-variable@1.3.0
package.json
Happy to provide an isolated test-case and run against other versions of node, stylelint etc if you think doing this would be useful.