jscs-jsdoc icon indicating copy to clipboard operation
jscs-jsdoc copied to clipboard

Separate checkTypes rule into checkTypes and checkNativeTypeCase

Open gajus opened this issue 10 years ago • 1 comments

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.

gajus avatar Oct 02 '15 00:10 gajus

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

qfox avatar Oct 02 '15 21:10 qfox