jscs-dev / jscs-jsdoc

JsDoc validation rules for jscs
MIT License
99 stars 35 forks source link

Parameter type validation for JSDuck should allow '/' as well as '|' as a value seperator #135

Open jdforrester opened 9 years ago

jdforrester commented 9 years ago

Per the JSDuck documentation, values can be separated by either '|' or '/'. However, only the first of these works.

qfox commented 9 years ago

Thanks, nice catch!

Whichever you choose, be consistent within your project.

Need to make some option for types parsing algorithm to use '/' instead of '|'. What you think if we just replace '/' to '|' for JSDuck (or if option is set)?

jdforrester commented 9 years ago

Need to make some option for types parsing algorithm to use '/' instead of '|'. What you think if we just replace '/' to '|' for JSDuck (or if option is set)?

We use '|' not '/' (I only noticed it when looking for other issues ;-)), so I'd love not only understanding both (which to looks like https://github.com/Kuniwak/jsdoctypeparser/pull/21 fixes) but having the style enforce one or the other for consistency, yeah – but should that be a follow-up (wishlist) issue?

qfox commented 9 years ago

@jdforrester Yeah, thanks for clarifying that. For now it looks like complicated task cuz we also need some info about used delimiter to check it. Don't see how to check it easily with regexps or something else. Anyway, it's a good idea ;-)