|
1 | 1 | # ESLint React Contributing Guide |
2 | 2 |
|
3 | | -> [!NOTE]\ |
4 | | -> FYI: The ESLint Raect is not a fork of the `eslint-plugin-react` and meanwhile `eslint-plugin-react` is not the upstream of ESLint React.\ |
5 | | -> Therefore, the rules and features you see in `eslint-plugin-react` may not necessarily appear in ESLint React and its plugins. |
| 3 | +Thank you for your interest in contributing to ESLint React! This guide will help you understand how to contribute effectively. |
6 | 4 |
|
7 | | -Hi! We, the maintainers, are really excited that you are interested in contributing to ESLint React. |
8 | | - |
9 | | -Before submitting your contribution though, please make sure to take a moment and read through the [Code of Conduct](CODE_OF_CONDUCT.md), as well as the appropriate section for the contribution you intend to make: |
10 | | - |
11 | | -- [ESLint React Contributing Guide](#eslint-react-contributing-guide) |
12 | | - - [Issue Reporting Guidelines](#issue-reporting-guidelines) |
13 | | - - [Pull Request Guidelines](#pull-request-guidelines) |
14 | | - - [Development Guide](#development-guide) |
15 | | - - [Packages Overview](#packages-overview) |
16 | | - - [Internal Packages](#internal-packages) |
17 | | - - [Utility Modules](#utility-modules) |
18 | | - - [Core & Shared Modules](#core--shared-modules) |
19 | | - - [Public Packages](#public-packages) |
20 | | - - [ESLint Plugins](#eslint-plugins) |
21 | | - - [Website & Playground](#website--playground) |
| 5 | +> [!NOTE] |
| 6 | +> ESLint React is not a fork of or derived from `eslint-plugin-react`. Features in `eslint-plugin-react` may not appear in ESLint React. |
22 | 7 |
|
23 | 8 | ## Issue Reporting Guidelines |
24 | 9 |
|
25 | | -- The issue list of this repo is **exclusively** for bug reports and feature requests. Non-conforming issues will be closed immediately. |
26 | | - |
27 | | -- Try to search for your issue, it may have already been answered or even fixed in the development branch. |
28 | | - |
29 | | -- Check if the issue is reproducible with the latest stable version of ESLint React packages. If you are using a pre-release, please indicate the specific version you are using. |
30 | | - |
31 | | -- It is **required** that you clearly describe the steps necessary to reproduce the issue you are running into. Although we would love to help our users as much as possible, diagnosing issues without clear reproduction steps is extremely time-consuming and simply not sustainable. |
32 | | - |
33 | | -- Use only the minimum amount of code necessary to reproduce the unexpected behavior. A good bug report should isolate specific methods that exhibit unexpected behavior and precisely define how expectations were violated. What did you expect the method or methods to do, and how did the observed behavior differ? The more precisely you isolate the issue, the faster we can investigate. |
34 | | - |
35 | | -- Issues with no clear repro steps will not be triaged. If an issue labeled "need repro" receives no further input from the issue author for more than 5 days, it will be closed. |
36 | | - |
37 | | -- If your issue is resolved but still open, don’t hesitate to close it. In case you found a solution by yourself, it could be helpful to explain how you fixed it. |
38 | | - |
39 | | -- Most importantly, we beg your patience: the team must balance your request against many other responsibilities — fixing other bugs, answering other questions, new features, new documentation, etc. The issue list is not paid support and we cannot make guarantees about how fast your issue can be resolved. |
| 10 | +- **Search First** - Your issue may already be addressed |
| 11 | +- **Verify Version** - Confirm reproducibility with the latest stable release |
| 12 | +- **Clear Reproduction Steps Required** - Detailed steps to reproduce are essential |
| 13 | +- **Minimal Code Example** - Provide only the code necessary to demonstrate the issue |
| 14 | +- **Be Patient** - The team balances many responsibilities |
40 | 15 |
|
41 | 16 | ## Pull Request Guidelines |
42 | 17 |
|
43 | | -- **You have to [sign your commits](https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits)**. |
44 | | - |
45 | | -- It's OK to have multiple small commits as you work on the PR - we will let GitHub automatically squash it before merging. |
46 | | - |
47 | | -- If adding new feature: |
48 | | - |
49 | | - - Provide convincing reason to add this feature. Ideally you should open a suggestion issue first and have it greenlighted before working on it. |
50 | | - |
51 | | -- If fixing a bug: |
52 | | - - If you are resolving a special issue, add `(fix: #xxxx[,#xxx])` (#xxxx is the issue id) in your PR title for a better release log, e.g. `fix: update entities encoding/decoding (fix #3899)`. |
53 | | - - Provide detailed description of the bug in the PR, or link to an issue that does. |
54 | | - |
55 | | -## Development Guide |
56 | | - |
57 | | -**NOTE: ESLint React is undergoing rapid development right now, and the docs may not reflect the current state of ESLint React. We are working hard to improve it.** |
58 | | - |
59 | | -### Packages Overview |
60 | | - |
61 | | -#### Local Packages |
62 | | - |
63 | | -- `.pkgs/configs`: Local config bases for use in the workspace. |
64 | | -- `.pkgs/eslint-plugin-local`: Local ESLint plugin for use in the workspace. |
65 | | - |
66 | | -#### Internal Packages |
| 18 | +- **Sign Your Commits** - Ensure your commits are signed |
| 19 | +- **Multiple Small Commits Allowed** - GitHub will squash before merging |
| 20 | +- **New Features** - Provide strong rationale, preferably with prior discussion |
| 21 | +- **Bug Fixes** - Include `(fix: #xxxx)` in your PR title and detailed description |
67 | 22 |
|
68 | | -##### Utility Modules |
| 23 | +## Repository Structure |
69 | 24 |
|
70 | | -- `packages/utilities/eff`: JavaScript and TypeScript utilities (previously some re-exports of the `effect` library). |
71 | | -- `packages/utilities/ast`: TSESTree AST utility module. |
72 | | -- `packages/utilities/var`: TSESTree AST utility module for static analysis of variables. |
73 | | -- `packages/utilities/jsx`: TSESTree AST utility module for static analysis of JSX. |
74 | | -- `packages/utilities/kit`: ESLint React's Plugin Kit for building plugins and rules. |
| 25 | +### Local Packages |
75 | 26 |
|
76 | | -##### Core & Shared Modules |
| 27 | +- `.pkgs/configs`: Workspace config bases |
| 28 | +- `.pkgs/eslint-plugin-local`: Internal workspace ESLint plugin |
77 | 29 |
|
78 | | -- `packages/core`: Utility module for static analysis of React core APIs and patterns. |
79 | | -- `packages/shared`: Shared constants, types and functions. |
| 30 | +### Internal Packages |
80 | 31 |
|
81 | | -#### Public Packages |
| 32 | +- **Utilities** |
| 33 | + - `packages/utilities/*`: Various utility modules (eff, ast, var, jsx, kit) |
| 34 | +- **Core & Shared** |
| 35 | + - `packages/core`: React core API analysis |
| 36 | + - `packages/shared`: Shared constants, types, and functions |
82 | 37 |
|
83 | | -##### ESLint Plugins |
| 38 | +### Public Packages |
84 | 39 |
|
85 | | -- `packages/plugins/eslint-plugin-react-x`: ESLint plugin for `"react"`. |
86 | | -- `packages/plugins/eslint-plugin-react-dom`: ESLint plugin for `"react-dom"`. |
87 | | -- `packages/plugins/eslint-plugin-react-web-api` - ESLint plugin for interacting with Web APIs. |
88 | | -- `packages/plugins/eslint-plugin-react-hooks-extra`: ESLint plugin for React Hooks related rules. |
89 | | -- `packages/plugins/eslint-plugin-react-naming-convention`: ESLint plugin for React naming conventions. |
90 | | -- `packages/plugins/eslint-plugin-react-debug`: ESLint plugin for debugging ESLint React rules. |
91 | | -- `packages/plugins/eslint-plugin`: The main ESLint plugin of ESLint React. Contains all the rules and config presets from the above plugins. |
| 40 | +- **ESLint Plugins** |
| 41 | + - `eslint-plugin-react-x`: Core React rules |
| 42 | + - `eslint-plugin-react-dom`: React DOM rules |
| 43 | + - `eslint-plugin-react-web-api`: Web API interaction rules |
| 44 | + - `eslint-plugin-react-hooks-extra`: Extra React Hooks rules |
| 45 | + - `eslint-plugin-react-naming-convention`: Naming convention rules |
| 46 | + - `eslint-plugin-react-debug`: Debugging rules for inspecting React patterns in code |
| 47 | + - `eslint-plugin`: Main plugin combining all rules and presets from the above packages |
92 | 48 |
|
93 | | -#### Website & Playground |
| 49 | +### Documentation |
94 | 50 |
|
95 | | -- `apps/website`: The documentation website for ESLint React. |
96 | | -- `apps/playground`: The playground for ESLint React (WIP). |
| 51 | +- `apps/website`: Documentation website |
| 52 | +- `apps/playground`: Interactive playground (WIP) |
0 commit comments