-
-
Notifications
You must be signed in to change notification settings - Fork 244
refactor(eslint-plugin): [sort-ngmodule-metadata-arrays]: properly handle multiple fixes at once #677
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
Conversation
}, | ||
fixable: 'code', | ||
schema: [], | ||
messages: { | ||
sortNgmoduleMetadataArrays: | ||
'`NgModule` metadata arrays should be sorted in ASC alphabetical order', | ||
suggestFix: 'Sort members (WARNING! comments will probably be messed up)', |
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.
Please, suggest a better message if that's the case.
Nx Cloud ReportCI ran the following commands for commit c8d58f7. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this branch Sent with 💌 from NxCloud. |
...(hasCommentsWithinElements(sourceCode, elements) | ||
? { suggest: [{ messageId: 'suggestFix', fix }] } | ||
: { fix }), |
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.
I even tried to use fix
, even if there were comments, but besides being very costly to maintain such an implementation, it's also very prone to failure. 😞
Codecov Report
@@ Coverage Diff @@
## master #677 +/- ##
==========================================
+ Coverage 85.60% 85.69% +0.08%
==========================================
Files 83 83
Lines 1924 1936 +12
Branches 337 339 +2
==========================================
+ Hits 1647 1659 +12
Misses 168 168
Partials 109 109
|
9f5bcbf
to
509898a
Compare
…ndle multiple fixes at once
…erly handle multiple fixes at once
Hi @rafaelss95 thanks so much for this, please see my latest email for how I'd love to see this broken down, please let me know on there if you have any questions at all! |
Besides addressing the issue #675, the report node is more accurate now and reports nested arrays.
PS: TBH, I'm not sure which scope should be this PR, so I used
refactor
🤷♂️Closes #677.