-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
feat(eslint-plugin-query): initial commit #4364
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
Conversation
2905682 to
a341931
Compare
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 25b969b:
|
TkDodo
left a comment
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.
This is very good work, thank you ❤️
What we would need to add is some docs for the eslint plugin, how to download it, how to use it, what the rule does etc.
|
also, @KubaJastrz I really like your eslint-plugin-react-query, especially this rule: So if you don't object, I would eventually like to add that one here, too :) |
|
@TkDodo I'm okay with that, let me know if you want to merge projects, as I'm no longer actively maintaining it. Let me know if you need npm package name too. |
…query into feature-eslint-plugin
|
Additional improvements:
|
|
I'm not exactly sure why the CI is failing |
eslint is failing: tests are flaky so I re-ran them. I think this got worse since we parallelized the pipeline, not sure why. I need to get around to stabilize those, sorry. |
Codecov ReportBase: 96.36% // Head: 92.62% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #4364 +/- ##
==========================================
- Coverage 96.36% 92.62% -3.74%
==========================================
Files 45 96 +51
Lines 2281 3799 +1518
Branches 640 967 +327
==========================================
+ Hits 2198 3519 +1321
- Misses 80 264 +184
- Partials 3 16 +13 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
packages/eslint-plugin-query/src/rules/prefer-query-object-syntax/prefer-query-object-syntax.ts
Outdated
Show resolved
Hide resolved
packages/eslint-plugin-query/src/utils/detect-react-query-imports.ts
Outdated
Show resolved
Hide resolved
Newbie012
left a comment
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.
I think it should be written as eslint or ESLint rather than EsLint
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.
If you could include my name somewhere in this, that would be great. Thank you! Nice work!
|
@KubaJastrz absolutely: 6ec2643 |
|
@all-contributors add @KubaJastrz for code |
|
I've put up a pull request to add @KubaJastrz! 🎉 |
|
@all-contributors add @Newbie012 for code |
|
I've put up a pull request to add @Newbie012! 🎉 |
|
release is here 🎉 https://github.com/TanStack/query/releases/tag/v4.14.0 Thank you for contributing this. @KubaJastrz if you have a twitter handle, let me know to give you credit in the announcement :) |
|
@Newbie012 I'm still not so sure about the auto fixing. Consider: the key will be fixed to: but it could also be: or, more likely: The thing is: we don't know. Maybe we should downgrade this to a suggestion rather than a fix? |
|
I think you're correct. I'll open a new PR that will downgrade it to a suggestion rather than an auto-fix. |
|
fixes in #4425 |
This PR contains two projects:
A few notes:
queryKey(i.e, query key factory pattern is not supported).