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
space-before-function-paren removes comments when fixing #12259
Closed
zaygraveyard opened this issue
Sep 11, 2019
· 4 comments
· Fixed by #12264, GrabarzUndPartner/gp-vue-boilerplate#227, GrabarzUndPartner/gp-vue-boilerplate#260, thinkwee/thinkwee.github.io#28 or WealthWizardsEngineering/service-registry#12
Closed
space-before-function-paren removes comments when fixing #12259
zaygraveyard opened this issue
Sep 11, 2019
· 4 comments
· Fixed by #12264, GrabarzUndPartner/gp-vue-boilerplate#227, GrabarzUndPartner/gp-vue-boilerplate#260, thinkwee/thinkwee.github.io#28 or WealthWizardsEngineering/service-registry#12
Labels
accepted
There is consensus among the team that this change meets the criteria for inclusion
archived due to age
This issue has been archived; please open a new issue for any further discussion
bug
ESLint is working incorrectly
rule
Relates to ESLint's core rules
Comments
zaygraveyard
added
bug
ESLint is working incorrectly
triage
An ESLint team member will look at this issue soon
labels
Sep 11, 2019
Hi @zaygraveyard, thanks for the report! I can reproduce this bug. |
mdjermanovic
added
accepted
There is consensus among the team that this change meets the criteria for inclusion
rule
Relates to ESLint's core rules
and removed
triage
An ESLint team member will look at this issue soon
labels
Sep 11, 2019
Perhaps we could implement here the logic from It concatenates all block comments. If there is a line comment, just reports without the autofix. |
@mdjermanovic yes, this would indeed fix this issue since it would preserve the comments |
I'm working on this |
mdjermanovic
added a commit
that referenced
this issue
Sep 12, 2019
mysticatea
pushed a commit
that referenced
this issue
Sep 14, 2019
This was referenced Sep 24, 2019
This was referenced Oct 8, 2019
This was referenced Oct 22, 2019
This was referenced Nov 9, 2019
eslint-deprecated
bot
added
the
archived due to age
This issue has been archived; please open a new issue for any further discussion
label
Mar 13, 2020
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
accepted
There is consensus among the team that this change meets the criteria for inclusion
archived due to age
This issue has been archived; please open a new issue for any further discussion
bug
ESLint is working incorrectly
rule
Relates to ESLint's core rules
Tell us about your environment
What parser (default, Babel-ESLint, etc.) are you using?
default
Please show your full configuration:
Configuration
What did you do? Please include the actual source code causing the issue, as well as the command that you used to run ESLint.
Tried to fix the following code
https://eslint.org/demo#eyJ0ZXh0IjoiLyplc2xpbnQgc3BhY2UtYmVmb3JlLWZ1bmN0aW9uLXBhcmVuOiBbJ2Vycm9yJywgJ25ldmVyJ10qL1xuZnVuY3Rpb24gZGVsYXkgLyo6OiA8VD4qLygpIHt9Iiwib3B0aW9ucyI6eyJwYXJzZXJPcHRpb25zIjp7ImVjbWFWZXJzaW9uIjoxMSwic291cmNlVHlwZSI6Im1vZHVsZSIsImVjbWFGZWF0dXJlcyI6e319LCJydWxlcyI6e30sImVudiI6e319fQ==
What did you expect to happen?
The space after
delay
to be removed while preserving the comment.What actually happened? Please include the actual, raw output from ESLint.
The space and the comment after
delay
got removed.Are you willing to submit a pull request to fix this bug?
No
Cause
eslint/lib/rules/space-before-function-paren.js
Line 127 in 460c5ad
The fixing is done by removing everything between the identifier and the opening parenthesis (without taking comments into consideration)
The text was updated successfully, but these errors were encountered: