Pass "optional" rule with 0 length strings
chasegiunta opened this issue ยท 7 comments
Would be great if the optional rule would also pass on an empty trimmed string. Guessing there might be a more technical reason as to why you chose not add in, but figured I'd bring it up just in case.
Yeah, @chasegiunta. It seems like a good idea to include empty strings as optional. But for now, we can't do this because of compatibility reasons. Maybe we could add a second argument to this rule with an includeString
flag, and it's going to be false by default. What do you think about it?
@imbrn Figured as much! I like the argument idea.
Do you want to give it a try? @chasegiunta
@imbrn Sure, will take a look over the weekend.
Nice! @chasegiunta ๐
@imbrn Sorry, I took a look at this I'm afraid this might be above my pay grade ๐ . I don't know ES6, don't know how to write tests, and wasn't able to load up any test environment after cloning the repo. Was thinking, since it was seemingly an easy additional, I'd be able to wing it ๐
No problem @chasegiunta.