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

feat(lint): output more detail about invalid formatting #191

Open
crfrolik opened this issue Jan 11, 2024 · 4 comments
Open

feat(lint): output more detail about invalid formatting #191

crfrolik opened this issue Jan 11, 2024 · 4 comments

Comments

@crfrolik
Copy link

Description

Running syncpack lint gives me output like the following (package names changed to protect the innocent):

$ yarn syncpack lint
Versions
= Version Group 1 ==============================================================
    10 → ignored
= Default Version Group ========================================================
   134 ✓ already valid
Semver Ranges
= Semver Group 1 ===============================================================
✓ 9 valid
= Semver Group 2 ===============================================================
    10 - 10 ignored
= Semver Group 3 ===============================================================
✓ 125 valid
Formatting
✘ package.json
✘ ModuleA/package.json
✘ ModuleB/package.json
✘ ModuleC/package.json

The problem is, the "Formatting" section indicates that I have a problem, but I have no idea what that problem is or how to fix it.

Suggested Solution

I think that if there is an error in the formatting (what does that mean?), the tool should at least tell me what that error is.

@crfrolik
Copy link
Author

Well, I figured out that I can fix it with syncpack format, but I think some indication of what's going on would still be helpful.

@JamieMason
Copy link
Owner

JamieMason commented Jan 11, 2024

Thanks a lot for raising this @crfrolik. What kinds of output would you want to see for this issue to be considered fixed? Granular things like "devDependencies is not in alphabetical order" etc? and/or do you have some other things in mind?

@crfrolik
Copy link
Author

It would be nice to have granular output about the specific problems, yes.
Also, maybe the tool could direct me to syncpack format as a way to fix those problems? I did manage to find it on my own after exploring, but that might have been due to luck.

@JamieMason JamieMason changed the title What does "Formatting" mean? feat(lint): output more detail about invalid formatting Jan 11, 2024
@JamieMason
Copy link
Owner

That's a good idea, I've added a "What next?" section on eg. syncpack list but haven't applied that to every command 👍

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