New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Option to enforce padded blocks only over a certain line threshold #7146
Comments
Hi @alphanull, thanks for the issue. It looks like there's not enough information for us to know how to help you. If you're reporting a bug, please be sure to include:
Requesting a new rule? Please see Proposing a New Rule for instructions. Requesting a rule change? Please see Proposing a Rule Change for instructions. If it's something else, please just provide as much additional information as possible. Thanks! |
I actually did look up the "Proposing a Rule Change" page but the link to the template seems to generate a "404": https://github.com/eslint/eslint/blob/master/templates/rule-change-proposal Otherwise, I think I have provided all information that is actually needed. So what could be missing? |
@alphanull sorry about the broken link, we're working to fix that. Here's the template. You got most of it, you should be able to tweak your existing posts a bit. |
No problem, I have updated my initial post. Hope its OK now. |
Thanks @alphanull, looks good now. I don't have any strong opinions on this, let's see what the rest of the team thinks. |
I don't use padded-blocks myself (my style is to add padding to the outside of blocks), but this seems like a reasonable request. I'll endorse (:+1:). |
Thank you platinumazure! Imho, the ability to add padding outside of blocks as well is also useful. |
In addition, I think the following restrictions should apply to
|
I'm closing this issue because it looks like consensus couldn't be reached. While we wish we could accommodate all requests, we have limited resources and do need to prioritize. We've found that issues failing to reach consensus after 21 days tend to never reach consensus, and as a team have decided to close such issues. This doesn't mean the idea isn't interesting or valuable, only that it's not something the team can commit to at the moment. |
What rule do you want to change?
padded-blocks
Does this change cause the rule to produce more or fewer warnings?
Fewer.
How will the change be implemented? (New option, new default behavior, etc.)?
New option. Maybe something like:
{ minLines: n }
Please provide some example code that this change will affect:
What does the rule currently do for this code?
Warning / Error: "Block must be padded by blank lines."
What will the rule do after it's changed?
No warning when using
padded-blocks
with the option:{ minLines: 2 }
since the block only contains one line. Should also work in confunction with fix.The text was updated successfully, but these errors were encountered: