diff --git a/.coderabbit.yaml b/.coderabbit.yaml new file mode 100644 index 0000000000..21d884dbeb --- /dev/null +++ b/.coderabbit.yaml @@ -0,0 +1,12 @@ +# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json + +reviews: + request_changes_workflow: false + slop_detection: + enabled: true + +knowledge_base: + code_guidelines: + enabled: true + filePatterns: + - 'CONTRIBUTING.md' diff --git a/.github/pull_request_template b/.github/pull_request_template deleted file mode 100644 index 2c10bc7d7d..0000000000 --- a/.github/pull_request_template +++ /dev/null @@ -1,8 +0,0 @@ -## 🎯 Changes - - - -## ✅ Checklist - -- [ ] I have followed the steps in the [Contributing guide](https://github.com/TanStack/table/blob/main/CONTRIBUTING.md). -- [ ] I have tested this code locally with `pnpm test:pr`. diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 3cda47f4f1..cdc242820d 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -5,7 +5,8 @@ ## ✅ Checklist - [ ] I have followed the steps in the [Contributing guide](https://github.com/TanStack/table/blob/main/CONTRIBUTING.md). -- [ ] I have tested this code locally with `pnpm run test:pr`. +- [ ] I have tested code changes locally with `pnpm test` and `pnpm test:e2e`, or these tests do not apply to this pull request. +- [ ] I fully understand the code in this pull request, including any code generated with AI assistance. ## 🚀 Release Impact diff --git a/.gitignore b/.gitignore index eee942d0cf..3ac08645da 100644 --- a/.gitignore +++ b/.gitignore @@ -62,6 +62,5 @@ vite.config.ts.timestamp-* .claude/* .cursor/* -Agents.md .agents/* terminalOutput diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000000..af9e354350 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,10 @@ +# Agent Instructions + +Before analyzing or changing this repository, read and follow +[`CONTRIBUTING.md`](./CONTRIBUTING.md). Its contribution, development, testing, +pull request, and changeset requirements apply to AI-assisted work as well as +human-authored work. + +Keep every change focused on one topic. Understand and verify all generated +code, run the required checks, and provide a concise pull request description +that follows the repository template. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3e82ab7dd0..128297d5d5 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -11,7 +11,7 @@ If you have questions about implementation details, help or support, then please ## Reporting Issues -If you have found what you think is a bug, please [file an issue](https://github.com/tanstack/table/issues/new). **PLEASE NOTE:** Issues that are identified as implementation questions or non-issues will be immediately closed and redirected to [Github Discussions](https://github.com/tanstack/table/discussions) +If you have found what you think is a bug, first search the [open and closed issues](https://github.com/TanStack/table/issues?q=is%3Aissue) to make sure it has not already been reported. If you cannot find an existing report, use the [bug report template](https://github.com/TanStack/table/issues/new?template=bug_report.yml). **PLEASE NOTE:** Issues that are identified as implementation questions or non-issues will be immediately closed and redirected to [Github Discussions](https://github.com/tanstack/table/discussions). ## Suggesting new features @@ -25,30 +25,23 @@ Before proceeding with development, ensure you match one of the following criter - Fixing a larger issue that has been previously discussed and agreed-upon by maintainers - Adding a new feature that has been previously discussed and agreed-upon by maintainers +## Pull Request Guidelines + +Every pull request must follow the [TanStack Table pull request template](.github/pull_request_template.md). Complete its description and checklist without removing or bypassing the required sections. + +- Search the [open and closed pull requests](https://github.com/TanStack/table/pulls?q=is%3Apr) before starting work to avoid duplicating an existing contribution. +- Keep each pull request focused on one change or topic. Pull requests that combine unrelated changes will be closed with a request to split them into separately reviewable contributions. +- Write a concise description that clearly explains what changed and why. Follow the sections in the pull request template; a long, unstructured description makes a contribution harder to review. +- You may use AI tools to help generate code, but you remain responsible for understanding, testing, and verifying every submitted change. Do not submit unreviewed, low-quality, or irrelevant generated code. +- Do not mass-submit unrelated or low-quality AI-generated pull requests. We treat that behavior as spam and may close the pull requests, block the contributor, and report the GitHub account. + ## Development Workflow -- Fork this repository, we prefer the `feat-*` branch name style -- Ensure you have `pnpm` installed -- Install the project's dependencies and linkages by running `pnpm install` -- Auto-build and auto-test files as you edit by running `pnpm dev` -- Implement your changes and tests -- To run examples, follow their individual directions. Usually this includes: - - cd into the example directory - - Do NOT install dependencies again or do any linking. Nx already handles this for you. Only run install from the project root. - - Starting the dev server with `pnpm dev` or `pnpm start` (from the example directory) -- To test in your own projects: - - Build/watch for changes with `pnpm build`/`pnpm dev` -- Document your changes in the appropriate documentation website markdown pages -- Create a changeset (changelog entry) for your changes by running `pnpm changeset` -- Commit your work and open a pull request -- Submit the PR for review - -## Adding a new example - -- Clone an existing example into the appropriate `examples` directory -- Name it the example name in kebab-case -- Update the new example's package.json to match the new example name and any other details -- Check dependencies for unused packages -- Install any additional packages to the example that you may need -- Update the docs/config.json file to include the new example in the navigation sidebar -- Commit the example eg. `docs: Add example-name` +- Fork the repository and create a branch for your contribution. We prefer the `feat-*` branch name style. +- Ensure you have `pnpm` installed, then install dependencies from the repository root with `pnpm i`. Do not install dependencies separately inside an example. +- Build the affected packages with `pnpm build`. Use `pnpm build:all` when you need to build every package. +- Implement your change, including relevant tests and documentation. +- To run an example, change into its directory and run `pnpm dev` or `pnpm start`. Examples run on [http://localhost:7777](http://localhost:7777) by default. +- Before opening a pull request with code changes, run both `pnpm test` and `pnpm test:e2e` from the repository root. On the first end-to-end test run, you may need to install the browser with `pnpm test:e2e:install`. Documentation, configuration, and other non-code changes do not require these test suites. +- Every change that affects a published package must include a changeset. Create the changelog entry with `pnpm changeset`; documentation, CI, and development-only changes do not require one. +- Commit your work, open a pull request, complete the required template, and submit it for review.