jsdoc-tag-order
Enforce a consistent order of JSDoc tags.
- Rule ID:
tai-kun/jsdoc-tag-order - Auto-fix: No
Requires tags to appear in the order @template/@typeParam → @param → @default → @returns → @throws → @note → @deprecated → @internal/@beta → @see → unknown tags.
Configuration
Add the rule to lint.rules in vite.config.ts to enable it.
"tai-kun/jsdoc-tag-order": "error",
Examples
Invalid
/**
* @returns The result.
* @param value The value.
*/
Valid
/**
* @param value The value.
*
* @returns The result.
*/
Notes
- This rule reports only; it does not auto-fix.
- Comments containing
@exampleor fenced code are ignored. - Unknown tags must come after known tags.