-
Notifications
You must be signed in to change notification settings - Fork 151
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: Add custom ESLint plugin for YAML sorting #630
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: a2a23c9 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
- http: https://alephzero.drpc.org | ||
- http: https://rpc.alephzero.raas.gelato.cloud |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should exclude RPC urls from sorting (because there might be a reason to sort these according to reliability
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, I was not aware of it.
fixed also did same for block explorers
b76c3b1
to
9a41015
Compare
what worries me is this PR removes yaml files comments. |
Description
Added a custom ESLint plugin that enforces consistent sorting in YAML files. The plugin specifically targets arrays in chain and deployment configuration files, sorting:
tokens
arrays bychainName
tokens[].connections
arrays bytoken
This improves readability, reduces merge conflicts, and makes changes to these arrays more predictable and consistent.
Also added a convenience npm script
sort-yaml
to easily format all YAML files.Related issues
hyperlane-xyz/hyperlane-monorepo#5547
Backward compatibility
Yes. This change only affects linting rules and doesn't modify any runtime behavior.
Testing
The plugin has been tested against existing YAML files in the
chains
anddeployments
directories. The sorting logic properly preserves all data while reorganizing it consistently.