jscs-dev / jscs-jsdoc

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

Separate checkTypes rule into checkTypes and checkNativeTypeCase #169

Open gajus opened 8 years ago

gajus commented 8 years ago

I only want to make sure that when type is native it is one of the following: boolean, number, string, Object, Array, Date, RegExp.

I do want to allow types that refer to typedef, e.g. foo~something.

Based on the current https://github.com/jscs-dev/jscs-jsdoc#checktypes description, it appears that this rule disallows use of custom types.

qfox commented 8 years ago

It should not. It just checks that your types (native/custom whatever) are parseable. Here you can try it: http://kuniwak.github.io/jsdoctypeparser/

Atm, jsdoc using v1.4, and upgrade in progress. And I was trying to implement it since the end of aug. Guess it's time to do this.

foo~something is a valid jsdoc type so the rule should NOT report it.

Ref: https://github.com/jscs-dev/node-jscs/issues/1577