-
-
Notifications
You must be signed in to change notification settings - Fork 508
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(graphql_analyze): noDuplicatedFields #3308
feat(graphql_analyze): noDuplicatedFields #3308
Conversation
CodSpeed Performance ReportMerging #3308 will degrade performances by 6.23%Comparing Summary
Benchmarks breakdown
|
911f2a3
to
f125808
Compare
version: "next", | ||
name: "noDuplicatedGraphqlFields", | ||
language: "graphql", | ||
recommended: true, |
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.
Since this rule comes from an existing one, you should add the source: https://github.com/biomejs/biome/blob/main/crates/biome_analyze/CONTRIBUTING.md#biome-lint-rules-inspired-by-other-lint-rules
Not sure if we should do the same for the other rule
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.
Ah yes, I forgot about that. The other rule also has an equivalent version in graphql-eslint, I guess it makes sense to also add a source for it
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.
You'll have to rebase, and change declare_rule
to declare_lint_rule
f1f6d11
to
63da6c3
Compare
Ah, sorry I didn't see your comment. Thanks for rebasing this for me |
Just one nit @vohoanglong0107, we should avoid having the language name inside the rule's name. We already have the metadata that tells us the language. |
I'm a little confused about this, but what if there is another rule for JSON called noDuplicatedFields, how could we config both of them? |
That's the beauty of this analyzer. A rule should work across languages, and the infrastructure will take care of it. Imagine the a11y rules, they need to work both in JSX and HTML. The infrastructure and the website still needs some final touches, but we'll get there. |
Ahah, I understand. I will keep this in mind when developing further lint rules |
63da6c3
to
2bf29fb
Compare
Feel free to merge it :) |
Summary
Implement no-duplicate-fields lint rule from
graphql-eslint
Test Plan
All tests should pass.