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
Rule Proposal: func-body-max-length or func-body object #6146
Comments
Thank you for this issue. At first, we are not accepting rules for the performance of a specific platform. Such rules are proper as plugins. Also, I don't think we need this rule in core because we already have several rules for function-size: |
Agree. I think this is better as plugin. |
#6078 is related as well. |
Agree it's a better fit for a custom rule, but not in core. |
There are already 3 rules covering |
It looks like v8-func-inline is exactly what you are looking for. Since it already exists as a plugin, that is easily installable, I'm going to close this issue, because I don't think those types of specialized rules are a good fit for the core. If you disagree, please feel free to reopen. |
Hi all, Limiting the size of a function can be a good practice, like limiting file lengths (max-lines), line lengths (max-len), callback depth (max-nested-callbacks) or block depth (max-depth). In everyday work, I often encounter large functions in JS projects (more than 200 lines). Such functions can be very difficult to understand. I think that a Thanks |
It's principally geared towards performance in Node.js: 50% boost is non-negligeable.
cf https://medium.com/@borismcr/this-is-a-good-candidate-for-an-eslint-plugin-5cb3d6b96f93#.3b00geo6f
But it could also be useful to alert the programmer that a function is too big.
Concerning the
max-line
property, Iv seen schools enforcing 25 lines per function in the C course.In the same way as max-len, the
max-length
ruleThe text was updated successfully, but these errors were encountered: