Skip to content
tai-kun's Vite+ Lint Plugins
Esc
↑↓navigate↵open⌘Jpreview
On this page

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 @example or fenced code are ignored.
  • Unknown tags must come after known tags.

Was this page helpful?