Skip to content

[RFC]: Add ESLint rule to enforce spacing after a returns annotation #127

@Planeshifter

Description

@Planeshifter

The rule should be configurable. Per our conventions, we should configure it to enforce 1 space after returns, with the exception of multi-line output. E.g.,

// Good...
var v = foo();
// returns 'beep'

// Okay...
var f = beep();
/* returns
{
    ...
}
*/

// Bad...
var p = boop();
// returns             'bip'

To make this rule more specific, instead of also applying to multi-line returns annotations, instead it can only apply to // returns and // => annotations beginning with // (and // e.g., returns and // e.g., =>)

Metadata

Metadata

Assignees

Labels

FeatureTask to add a new feature.difficulty: 1Low degree of difficulty. Should be straightforward to implement and/or resolve.estimate: <2hrsTask which should take less than 2 hours.🤖 AIAllowed to use AI.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions