question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add `multiline-return` STATEMENT_TYPE to padding-line-between-statements rule

See original GitHub issue

What rule do you want to change? padding-line-between-statements Specifically, add a multiline-return STATEMENT_TYPE to it.

Does this change cause the rule to produce more or fewer warnings? more

How will the change be implemented? (New option, new default behavior, etc.)? New option.

Please provide some example code that this change will affect:

/*eslint padding-line-between-statements: [
    "error",
    { blankLine: "always", prev: "*", next: "multiline-return" }
]*/
const movie = 'title';
return {
  that: 'thing',
  you: 'do',
};

What does the rule currently do for this code? No padding-line-between-statements observer can be set for multiline-return statements, specifically. All return statements line lengths are treated the same.

What will the rule do after it’s changed? A padding line would be added just before the return statement if used per my sample code above.

Are you willing to submit a pull request to implement this change? Apologies. Not at this time.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
eslint-deprecated[bot]commented, Jun 7, 2020

Unfortunately, it looks like there wasn’t enough interest from the team or community to implement this change. While we wish we’d be able to accommodate everyone’s requests, we do need to prioritize. We’ve found that issues failing to reach accepted status after 21 days tend to never be accepted, and as such, we close those issues. This doesn’t mean the idea isn’t interesting or useful, just that it’s not something the team can commit to.

Thanks for contributing to ESLint and we appreciate your understanding.

1reaction
185drivercommented, May 6, 2020

Edited the issue to match my intent. Thank you for the feedback.

Read more comments on GitHub >

github_iconTop Results From Across the Web

padding-line-between-statements - Pluggable JavaScript Linter
This rule requires or disallows blank lines between the given 2 kinds of statements. ... a blank line between a variable declaration and...
Read more >
Return statement on multiple lines - python - Stack Overflow
In python, an open paren causes subsequent lines to be considered a part of the same line until a close paren. So you...
Read more >
padding-line-between-statements - Rules - ESLint
This rule requires or disallows blank lines between the given 2 kinds of statements. ... a blank line between a variable declaration and...
Read more >
vue/padding-line-between-blocks
This rule requires or disallows blank lines between the given 2 blocks. Properly blank lines help developers to understand the code.
Read more >
Rationale - Prettier
We haven't been able to find a good rule for all those cases, so Prettier instead ... And if you'd like to go...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found