Skip to content

Comments

feat(oxlint): implement --print-config cli option#4742

Closed
nicksrandall wants to merge 11 commits intooxc-project:mainfrom
nicksrandall:main
Closed

feat(oxlint): implement --print-config cli option#4742
nicksrandall wants to merge 11 commits intooxc-project:mainfrom
nicksrandall:main

Conversation

@nicksrandall
Copy link

I've attempted to implement --print-config for oxlint. This implementation works but I'm almost certain there is a better way to do this and I'm open to feedback.

See discussion: #4279

@github-actions github-actions bot added A-linter Area - Linter A-cli Area - CLI labels Aug 7, 2024
@graphite-app
Copy link
Contributor

graphite-app bot commented Aug 7, 2024

Your org has enabled the Graphite merge queue for merging into main

Add the label “merge” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix.

You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link.

@DonIsaac
Copy link
Contributor

DonIsaac commented Aug 7, 2024

This looks related to #4720. I'd like to reach consensus there before we merge this.

@Boshen Boshen requested a review from DonIsaac August 8, 2024 02:37
@Boshen
Copy link
Member

Boshen commented Aug 8, 2024

The cli can get merged first because it's a eslint command.

Behavior wise I think it should just print out whatever is read, it doesn't matter whether it's v8 or v9.

@DonIsaac
Copy link
Contributor

DonIsaac commented Aug 8, 2024

If ESLint supports it then we should too.

@DonIsaac
Copy link
Contributor

DonIsaac commented Aug 8, 2024

@nicksrandall it appears CI checks are not passing, let me know when you're ready for a review.

@nicksrandall
Copy link
Author

@DonIsaac I believe I'm ready for review. Thanks you!

@codspeed-hq
Copy link

codspeed-hq bot commented Aug 8, 2024

CodSpeed Performance Report

Merging #4742 will not alter performance

Comparing nicksrandall:main (0ecdf4e) with main (a105df3)

Summary

✅ 29 untouched benchmarks

@nicksrandall
Copy link
Author

I'm not sure why the tests are failing... there must be some issue when a struct implements "Serialize" and "JsonSchema" traits? Any idea on how I can fix ?

@DonIsaac
Copy link
Contributor

DonIsaac commented Aug 9, 2024

Tests are failing because there are schema snapshots that need updating. Have you run cargo test and committed the changes?

let mut config = serde_json::to_value(self.eslint_config.as_ref()).unwrap();
config
.get_mut("rules")
.unwrap()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use expect and provide an error message, otherwise users will have no idea what happened.



## settings

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why were these removed?

@mysteryven
Copy link
Contributor

Hi! @nicksrandall Do you mind me taking this?

@nicksrandall
Copy link
Author

Please do!

DonIsaac pushed a commit that referenced this pull request Oct 22, 2024
…roject (#6579)

Continue work on #4742.

Only `oxlint --print-config all` is supported. It's useful to migrate from command-line interface to config file.

The `--print-config PATH` looks not really useful for us now, I will add it after config file overrides supported.
@mysteryven
Copy link
Contributor

Close in favor of #6579

@mysteryven mysteryven closed this Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-cli Area - CLI A-linter Area - Linter

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants