import type { Rule } from 'eslint'; /** * Owns the blank-line-before-`return` policy. This rule deliberately replaces the * `always(*, return)` entry of `padding-line-between-statements`: the two cannot coexist * because they disagree on the compact case below, and two fixers fighting over the same line * never converge. Keeping the whole policy in one rule guarantees a single fixed point. * * Policy, applied to a `return` that has a preceding sibling statement in the same block: * - Compact body (the block holds exactly two statements and both are single-line): the * `return` MUST NOT have a blank line before it. A blank in a two-line body is pure noise. * - Any other body: the `return` MUST have exactly one blank line before it, matching the * long-standing `always(*, return)` behavior. * * A `return` that is the first statement in its block is left untouched (nothing to separate). * The fix only ever adds or removes blank lines: any comment in the gap, whether trailing the * previous statement's line or standing on its own line, is always preserved. */ declare const compactReturn: Rule.RuleModule; export default compactReturn;