Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass "optional" rule with 0 length strings #140

Closed
chasegiunta opened this issue Feb 18, 2019 · 7 comments
Closed

Pass "optional" rule with 0 length strings #140

chasegiunta opened this issue Feb 18, 2019 · 7 comments

Comments

@chasegiunta
Copy link

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.

@imbrn
Copy link
Owner

imbrn commented Feb 21, 2019

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?

@chasegiunta
Copy link
Author

@imbrn Figured as much! I like the argument idea.

@imbrn
Copy link
Owner

imbrn commented Feb 21, 2019

Do you want to give it a try? @chasegiunta

@chasegiunta
Copy link
Author

@imbrn Sure, will take a look over the weekend.

@imbrn
Copy link
Owner

imbrn commented Feb 22, 2019

Nice! @chasegiunta 👍

@chasegiunta
Copy link
Author

@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 😔

@imbrn
Copy link
Owner

imbrn commented Feb 25, 2019

No problem @chasegiunta.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants