Skip to content

Conversation

espada-edalex
Copy link
Contributor

@espada-edalex espada-edalex commented Jun 13, 2025

Summary by CodeRabbit

  • Documentation
    • Added documentation for a new ESLint rule "@tanstack/query/mutation-property-order" (recommended, fixable), specifying required property order for useMutation (onMutate, onError, onSettled), clarifying order-insensitive properties, and providing examples of correct and incorrect usage.
    • Updated the ESLint plugin Query docs to include the new rule in the published rules list.

@github-actions github-actions bot added the documentation Improvements or additions to documentation label Jun 13, 2025
Copy link

changeset-bot bot commented Sep 26, 2025

⚠️ No Changeset found

Latest commit: a203c19

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

coderabbitai bot commented Sep 26, 2025

Walkthrough

Adds documentation for a new ESLint rule "@tanstack/query/mutation-property-order" and updates the plugin rules list to reference it. Changes are documentation-only under docs/eslint/, with no functional or control-flow modifications. (50 words)

Changes

Cohort / File(s) Summary of Changes
ESLint rule docs updates
docs/eslint/eslint-plugin-query.md, docs/eslint/mutation-property-order.md
Added a new rule entry to the published rules list and introduced mutation-property-order docs detailing the @tanstack/query/mutation-property-order rule: required property order (onMutate, onError, onSettled), order-insensitive properties, examples of incorrect/correct usage, and notes that the rule is recommended and fixable.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

I twitch my ears at tidy lore,
A rule hops in to set the score.
onMutate first, then errors chime,
Settled last — in tidy time.
Docs refreshed, I thump with glee. 🐇✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The pull request contains no description, omitting all required sections from the repository’s template such as the “## 🎯 Changes” summary, contributor checklist, and release impact information. Please populate the PR description using the repository template by adding a “## 🎯 Changes” section that describes the documentation additions, completing the “## ✅ Checklist” with contribution and testing confirmations, and specifying any “## 🚀 Release Impact” details regarding whether a changeset is needed or if it’s docs-only.
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The title clearly and concisely summarizes the main change by indicating that documentation for the new mutation-property-order ESLint rule is being added.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@espada-edalex espada-edalex force-pushed the add-docs-for-mutation-property-order-eslint-rule branch from b1d4cc6 to a203c19 Compare September 28, 2025 23:27
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b1d4cc6 and a203c19.

📒 Files selected for processing (2)
  • docs/eslint/eslint-plugin-query.md (1 hunks)
  • docs/eslint/mutation-property-order.md (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • docs/eslint/mutation-property-order.md
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-09-02T17:57:33.184Z
Learnt from: TkDodo
PR: TanStack/query#9612
File: packages/query-async-storage-persister/src/asyncThrottle.ts:0-0
Timestamp: 2025-09-02T17:57:33.184Z
Learning: When importing from tanstack/query-core in other TanStack Query packages like query-async-storage-persister, a workspace dependency "tanstack/query-core": "workspace:*" needs to be added to the package.json.

Applied to files:

  • docs/eslint/eslint-plugin-query.md

@TkDodo TkDodo merged commit 593eacb into TanStack:main Sep 29, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants