-
-
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
fix(eslint-plugin): [member-delimiter-style] correct invalid fix for multiline with params on the same line #3177
fix(eslint-plugin): [member-delimiter-style] correct invalid fix for multiline with params on the same line #3177
Conversation
Thanks for the PR, @tanohzana! typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community. The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately. Thanks again! 🙏 Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently on https://opencollective.com/typescript-eslint. As a thank you, your profile/company logo will be added to our main README which receives thousands of unique visitors per day. |
Codecov Report
@@ Coverage Diff @@
## master #3177 +/- ##
==========================================
- Coverage 92.91% 92.91% -0.01%
==========================================
Files 316 316
Lines 10818 10829 +11
Branches 3059 3062 +3
==========================================
+ Hits 10052 10062 +10
Misses 342 342
- Partials 424 425 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there are a lot of changes here which seem to go further than fixing the bug.
could you please detail why you've removed an option from the rule to fix the bug?
import { | ||
RuleFix, | ||
RuleFixer, | ||
} from '@typescript-eslint/experimental-utils/src/ts-eslint'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't add deep imports on /src
from plugins.
This is availaible on the TSESLint
export of @typescript-eslint/experimental-utils
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed here: a27e2e3
multilineDetection: { | ||
enum: ['brackets', 'last-member'], | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why have you removed this from the schema entirely?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed here: 75e83de
@@ -21,14 +28,26 @@ type Config = BaseOptions & { | |||
typeLiteral?: BaseOptions; | |||
interface?: BaseOptions; | |||
}; | |||
multilineDetection?: 'brackets' | 'last-member'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why have you removed this option entirely?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed here: e5353a9
Sorry for the unneeded changes, I had differences between the version I cloned a few weeks ago and the new one. But all should be fixed now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - thanks for working on this!
Everything was explained here: #2982
The rule would produce invalid code when trying to fix it.
Fixes #2982