Closed gpiress closed 8 years ago
We can leave allExcept
, but i think function
should be there by default, what do you think?
Ok, I believe we can leave the function
keyword as a default excluded value. =)
Sorry for the delay in seeing this message.
Okay, just to clarify, this is the behaviour as it is in this pull request:
requireSpaceBeforeKeywords: true
, it checks for all the defaultKeywords, EXCLUDING the function
keyword, which means the code posted in the original issue would be valid, as required.requireSpaceBeforeKeywords: { allExcept: ['else'] }
, this would still validate the function
keyword, checking for a space before it.This way, it by default doesn't check for the function
keyword, but it is possible to do so through the allExcept
version of the rule.
Is it as expected?
Awesome, thank you!
requireSpaceBeforeKeywords
Added a new value option for the rule, an Object with an allExcept property, to inform which keywords shouldn't be targeted by the rule.
Fixes issue #2041, as asked by user radek-holy
I went for the extra value approach as indicated in the issue, because I thought it would be more of a general approach that can be used across other rules and to behave similar as all other rules.