Skip to content
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

All decorations get moved down to the bottom line after Prettier Format #642

Open
alexgonch opened this issue Apr 15, 2021 · 8 comments
Open
Assignees

Comments

@alexgonch
Copy link

alexgonch commented Apr 15, 2021

atom: v1.56.0 x64 (Win 10)
linter-ui-default: v3.3.1
linter: v3.3.1
liner-eslint: v8.6.6

As the title explains, if there are any ESLint UI decorations within the file (underlines, gutter indicators), they all get moved to the bottom line after using Prettier's Format function and stay that way until I reopen the file again. Notably, after this happens, even clicking on the issues through the bottom panel brings the cursor to that last line in the file. I have been seeing this behaviour for the past couple months.

I would really appreciate any input on how to work around this. Disabling decorations solves the issue but I'd love to keep them.

image
image

@aminya
Copy link
Collaborator

aminya commented Apr 19, 2021

Is there a repository that I can try this on?

@alexgonch
Copy link
Author

Is there a repository that I can try this on?

I haven't been able to reproduce this in a clean repo, there must be some sort of a bad configuration in the private repo I'm having this issue in. I wasn't able to figure it out yet. I will update this thread if I stumble upon a solution.

@aminya
Copy link
Collaborator

aminya commented Apr 27, 2021

I was able to reproduce this in one of the repositories. It gets resolved if you open/close the file, but it seems like a bug somewhere.

Maybe it is related to Linter-eslint and not linter-ui-default.
https://github.com/AtomLinter/linter-eslint/releases

Might be related to the workaround I made for a line-ending issue
AtomLinter/linter-eslint@7262ac6

@alexgonch
Copy link
Author

@aminya Hey, thanks for looking into this, really glad to hear you were able to reproduce!
One last piece of info from me that may or may not be helpful: when I have "Show Decorations" on and use Prettier format, which pushes all decorations down, clicking on the "Line" in the bottom panel brings the cursor to the bottom of the file as well despite showing the correct line and position of the lint warning/error.

image

@aminya
Copy link
Collaborator

aminya commented May 3, 2021

Have you tried Atom nightly? Recently there were some breaking changes in Atom which are fixed in the nightly.

@alexgonch
Copy link
Author

@aminya I just tried it and the problem persists in my repository.

@aminya aminya self-assigned this May 3, 2021
@aminya
Copy link
Collaborator

aminya commented May 3, 2021

The issue is quite hard to fix because we don't know why it happens. I need to debug the code to see why it is happening.

Is the repo open source? If so please share the link, so I can have a reproducible environment.

@alexgonch
Copy link
Author

@aminya Unfortunately, it's private, and I was not able to reproduce this issue in any of my open repos.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants