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

New Rule: enforce order of tags

Open dtracers opened this issue 9 years ago • 2 comments

Maybe allow a way to enforce order of tags. Examples


// in config
"enforceTagOrder: {"param", "returns"}

// valid
/**
 * @param param1
 * @param param2
 * @returns
 *.

// invalid
/**
 * @returns
 * @param param1
 * @param param2
 */

dtracers avatar Mar 24 '16 19:03 dtracers

Yeah, nice idea. ;-)

What to do with not listed tags? Should they placed before or after? Or maybe we should just report order between listed tags and keep the rest at their places? (More polite way, I guess).

qfox avatar Mar 24 '16 19:03 qfox

That was what I was thinking. Then you could use the presets for the different languages On Mar 24, 2016 2:35 PM, "Alexej Yaroshevich" [email protected] wrote:

Yeah, nice idea. ;-)

What to do with not listed tags? Should they placed before or after? Or maybe we should just report order between listed tags and keep the rest at their places? (More polite way, I guess).

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/jscs-dev/jscs-jsdoc/issues/195#issuecomment-200985251

dtracers avatar Mar 24 '16 19:03 dtracers