Skip to main content
This rule requires that the timeoutMS property in action options has a trailing comment that describes the duration in human-readable form (seconds or minutes). This improves code readability by making timeout durations immediately clear without mental math.

Rule Details

This rule checks that any timeoutMS property has a trailing inline comment formatted as // N seconds or // N minutes. The rule automatically generates the correct comment based on the millisecond value. Severity: Warning Auto-fixable: Yes

Examples

Incorrect

Correct

Auto-fixes

The rule automatically adds or replaces comments with the correct duration:
The rule intelligently handles trailing commas and preserves formatting when adding comments.

When to Use

This rule is included in the strict config. While not critical, it significantly improves code readability by making timeout durations immediately apparent without needing to convert milliseconds mentally.