-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
feat(eslint-plugin): add new rule no-empty-function #626
feat(eslint-plugin): add new rule no-empty-function #626
Conversation
Definitely one of those awkward ones that is not super clear-cut, but overall seems like a reasonable change and I think matches user expectations |
9911644
to
7234826
Compare
Codecov Report
@@ Coverage Diff @@
## master #626 +/- ##
==========================================
- Coverage 94.27% 94.25% -0.03%
==========================================
Files 106 107 +1
Lines 4369 4388 +19
Branches 1202 1208 +6
==========================================
+ Hits 4119 4136 +17
- Misses 145 147 +2
Partials 105 105
|
Code LGTM! Thanks for doing this! |
Just merged an older eslint ruleset (used in JS projects) with a Do you think these could be added to the |
We only update |
Thx for the fix. But how can I use this PR? Any rules that I can use to override the recommended ruleset? |
Extends the no-empty-function rule from ESlint core to allow for empty constructor bodies when parameter properties are used (a.k.a. concise constructor functions).
Fixes #426
Examples of allowed code
...which is functionally equivalent to writing:
Aside from this one specific case, the rule passes through to ESLint core
no-empty-function
for everything else, so the following still applies:Examples of valid code
Examples of invalid code