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

order-properties output is malformed #10

Closed
gabegorelick opened this issue Oct 5, 2020 · 2 comments
Closed

order-properties output is malformed #10

gabegorelick opened this issue Oct 5, 2020 · 2 comments
Labels
type: bug Something isn't working :(

Comments

@gabegorelick
Copy link

The order-properties rule uses the disparity module to provide styled output. However, disparity uses terminal escape characters that are problematic. For one, the ESC characters used lead to invalid XML when generating results in junit format. But even the default text output doesn't seem to work in all terminals:
image

I'm not aware of any eslint rules that attempt to display a diff like this. Perhaps the output could be something like "the order of properties should be x, y, z" or "dependencies should be alphabetized." I'm not sure the minutiae of which exact line is in error really matters, since if there's any error users will probably just use --fix.

@JoshuaKGoldberg
Copy link
Owner

JoshuaKGoldberg commented Sep 13, 2023

Hmm, I don't reproduce this issue with VS Code 1.82.0 and zsh 5.8.1 on macOS Ventura 13.2. What shell/terminal/etc are you using @gabegorelick (if you're still interested in this ~3 years later)?

Agreed that it's quite unusual to list the diff like this - especially since it should be resolved in --fix mode. Maybe it'd be better to give a general error the way https://github.com/lydell/eslint-plugin-simple-import-sort does?

cc @zetlen

@JoshuaKGoldberg JoshuaKGoldberg added status: in discussion Not yet ready for implementation or a pull request type: bug Something isn't working :( labels Sep 13, 2023
@JoshuaKGoldberg
Copy link
Owner

I ended up removing the diff in #40. The 0.3.x line shouldn't experience this bug anymore. Cheers!

@JoshuaKGoldberg JoshuaKGoldberg removed the status: in discussion Not yet ready for implementation or a pull request label Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working :(
Projects
None yet
Development

No branches or pull requests

2 participants