Open corysimmons opened 8 years ago
there is actually!
technically, it's to be used with transparent mixins, but you should be able to use them with custom properties as well.
i see now that while it's mentioned in the docs, it's not in the example config (and the naming apparently could be better)
in your .stylintrc
or options config just do:
{
mixins: ['lost-columnd']
}
lemme know if that works
Is that just an array of each property? It might get pretty hairy having to manually type in dozens of properties. Is it possible to throw a little regex in there?
{
mixins: ['lost-'*]
}
I know this seems specific, but I really am about to drop a bunch of tools that do this kinda stuff and I <3 Stylus.
yeah, it was just a quick and dirty fix for another user who wanted transparent mixins to not trip the invalid property rule. i could look into using regex for it.
That'd be awesome, thanks!
+1 That would be awesome indeed.
there is actually! technically, it's to be used with transparent mixins, but you should be able to use them with custom properties as well.
Some remarks:
customProperties
, we have to go to Options to see "Note that customProperties and mixins are aliases"..."customProperties": [ "-webkit-text-stroke-color", "-webkit-text-stroke-width" ],
to get rid of a very annoying range of spurious warnings. I suggest to add these two browser-dependent properties to your linter, BTW.It might get pretty hairy having to manually type in dozens of properties.
Yes, but on the other hand, it prevent typos, which is the point of this setting. :smile:
Akin to your remark, I might benefit from giving "-webkit-text-stroke-*"
but then I can get no warning on -webkit-text-stroke-widht
for example.
Not against the suggestion (we are free to avoid regexes anyway), just a heads up. :wink:
I make PostCSS plugins that use invalid properties.
I intentionally namespace them (e.g.
lost-columnd: 1/2
) so there's virtually zero chance they'll ever conflict with W3C.Is it possible to disable invalid property warning via .stylintrc?
Or, even better, would it be possible to make it so you can ignore a namespace? (I plan on making a lot of these
foo-
libraries in the coming months.