jscs-dev / jscs-jsdoc

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

Parameter type validation for JSDuck should allow primitives types #137

Closed jdforrester closed 8 years ago

jdforrester commented 9 years ago

Per the JSDuck documentation, values can be objects or primitive values. It's useful to distinguish whether you're expecting an object or a primitive. However, the latter case does not work.

Primitives types which fail

Krinkle commented 9 years ago

:+1:

qfox commented 9 years ago

Guys, both of them should works, just choose what you need. http://jscs.info/rule/jsDoc.html#checktypes

If you want to use both of them in the same project — seems like we need new rule value. Or just try to use checkTypes: true.

Krinkle commented 9 years ago

I think checkType: "strictNativeCase" will do what we want. We don't actually use boxed primitives. Allowing both only causes confusion and wasted human efforts to fix them to be lowercased instead. This rule would allow us to enforce that.

Thanks!

jdforrester commented 8 years ago

Sorry, this can be marked as resolved.