|
| 1 | +--- |
| 2 | +title: Contributing |
| 3 | +--- |
| 4 | + |
| 5 | +import diagram from "../../assets/monorepo_diagram.png" |
| 6 | + |
| 7 | +Contributions are welcome! |
| 8 | + |
| 9 | +Please follow our [contributing guidelines](https://github.com/Rel1cx/eslint-react/blob/main/.github/CONTRIBUTING.md). |
| 10 | + |
| 11 | +## Repository Structure |
| 12 | + |
| 13 | +### Local Packages |
| 14 | + |
| 15 | +- `.pkgs/configs`: Workspace config bases |
| 16 | +- `.pkgs/eslint-plugin-local`: Internal workspace ESLint plugin |
| 17 | + |
| 18 | +### Internal Packages |
| 19 | + |
| 20 | +- **Utilities** |
| 21 | + - `packages/utilities/eff`: JavaScript and TypeScript utilities (previously some re-exports of the `effect` library) |
| 22 | + - `packages/utilities/ast`: TSESTree AST utility module for static analysis |
| 23 | + - `packages/utilities/var`: TSESTree AST utility module for static analysis of variables |
| 24 | + - `packages/utilities/jsx`: TSESTree AST utility module for static analysis of JSX |
| 25 | + - `packages/utilities/kit`: ESLint React's Plugin Kit for building plugins and rules |
| 26 | +- **Core & Shared** |
| 27 | + - `packages/core`: Utility module for static analysis of React core APIs and patterns |
| 28 | + - `packages/shared`: Shared constants, types and functions |
| 29 | + |
| 30 | +### Public Packages |
| 31 | + |
| 32 | +- **ESLint Plugins** |
| 33 | + - `eslint-plugin-react-x`: Core React rules |
| 34 | + - `eslint-plugin-react-dom`: React DOM rules |
| 35 | + - `eslint-plugin-react-web-api`: Web API interaction rules |
| 36 | + - `eslint-plugin-react-hooks-extra`: Extra React Hooks rules |
| 37 | + - `eslint-plugin-react-naming-convention`: Naming convention rules |
| 38 | + - `eslint-plugin-react-debug`: Debugging rules for inspecting React patterns in code |
| 39 | + - `eslint-plugin`: Main plugin combining all rules and presets from the above packages |
| 40 | + |
| 41 | +### Documentation |
| 42 | + |
| 43 | +- `apps/website`: Documentation website |
| 44 | +- `apps/playground`: Interactive playground (WIP) |
| 45 | + |
| 46 | +## Repository Structure Diagram |
| 47 | + |
| 48 | +```mermaid |
| 49 | +flowchart TB |
| 50 | + %% Monorepo |
| 51 | + subgraph "Monorepo" |
| 52 | + %% Apps Subgraph |
| 53 | + subgraph "Apps" |
| 54 | + Website["Website"]:::apps |
| 55 | + Playground["Playground"]:::apps |
| 56 | + end |
| 57 | +
|
| 58 | + %% Packages Subgraph |
| 59 | + subgraph "Packages" |
| 60 | + Core["Core Functionality"]:::packages |
| 61 | + Shared["Shared Utilities"]:::packages |
| 62 | +
|
| 63 | + %% Utilities Subgraph |
| 64 | + subgraph "Utilities Modules" |
| 65 | + AST["AST Module"]:::utilities |
| 66 | + Eff["Eff Module"]:::utilities |
| 67 | + JSX["JSX Module"]:::utilities |
| 68 | + Kit["Kit Module"]:::utilities |
| 69 | + Var["Var Module"]:::utilities |
| 70 | + end |
| 71 | +
|
| 72 | + %% ESLint Plugins Subgraph |
| 73 | + subgraph "ESLint Plugins" |
| 74 | + ReactX["eslint-plugin-react-x"]:::plugins |
| 75 | + ReactDOM["eslint-plugin-react-dom"]:::plugins |
| 76 | + WebAPI["eslint-plugin-react-web-api"]:::plugins |
| 77 | + HooksExtra["eslint-plugin-react-hooks-extra"]:::plugins |
| 78 | + NamingConvention["eslint-plugin-react-naming-convention"]:::plugins |
| 79 | + Aggregated["Aggregated Plugin (@eslint-react/eslint-plugin)"]:::plugins |
| 80 | + end |
| 81 | + end |
| 82 | +
|
| 83 | + %% Scripts & Configurations |
| 84 | + Scripts["Scripts & Configurations"]:::external |
| 85 | +
|
| 86 | + %% Tests |
| 87 | + Tests["Tests"]:::external |
| 88 | + end |
| 89 | +
|
| 90 | + %% Relationships |
| 91 | + %% Plugins depend on Core and Shared |
| 92 | + Core -->|"dependency"| ReactX |
| 93 | + Core -->|"dependency"| ReactDOM |
| 94 | + Core -->|"dependency"| WebAPI |
| 95 | + Core -->|"dependency"| HooksExtra |
| 96 | + Core -->|"dependency"| NamingConvention |
| 97 | +
|
| 98 | + Shared -->|"dependency"| ReactX |
| 99 | + Shared -->|"dependency"| ReactDOM |
| 100 | + Shared -->|"dependency"| WebAPI |
| 101 | + Shared -->|"dependency"| HooksExtra |
| 102 | + Shared -->|"dependency"| NamingConvention |
| 103 | +
|
| 104 | + %% Utilities used by Core and Plugins |
| 105 | + AST ---|"provides"| Core |
| 106 | + Eff ---|"provides"| Core |
| 107 | + JSX ---|"provides"| Core |
| 108 | + Kit ---|"provides"| Core |
| 109 | + Var ---|"provides"| Core |
| 110 | +
|
| 111 | + AST ---|"provides"| ReactX |
| 112 | + Eff ---|"provides"| ReactX |
| 113 | + JSX ---|"provides"| ReactX |
| 114 | + Kit ---|"provides"| ReactX |
| 115 | + Var ---|"provides"| ReactX |
| 116 | +
|
| 117 | + %% Aggregation of Plugins |
| 118 | + ReactX -->|"aggregated"| Aggregated |
| 119 | + ReactDOM -->|"aggregated"| Aggregated |
| 120 | + WebAPI -->|"aggregated"| Aggregated |
| 121 | + HooksExtra -->|"aggregated"| Aggregated |
| 122 | + NamingConvention -->|"aggregated"| Aggregated |
| 123 | +
|
| 124 | + %% Website Documentation uses Core and Shared docs |
| 125 | + Website -->|"docs"| Core |
| 126 | + Website -->|"docs"| Shared |
| 127 | +
|
| 128 | + %% Scripts & CI automation interactions |
| 129 | + Scripts -->|"CI/CD"| Core |
| 130 | + Scripts -->|"CI/CD"| Shared |
| 131 | + Scripts -->|"CI/CD"| AST |
| 132 | + Scripts -->|"CI/CD"| Eff |
| 133 | + Scripts -->|"CI/CD"| JSX |
| 134 | + Scripts -->|"CI/CD"| Kit |
| 135 | + Scripts -->|"CI/CD"| Var |
| 136 | + Scripts -->|"CI/CD"| ReactX |
| 137 | + Scripts -->|"CI/CD"| ReactDOM |
| 138 | + Scripts -->|"CI/CD"| WebAPI |
| 139 | + Scripts -->|"CI/CD"| HooksExtra |
| 140 | + Scripts -->|"CI/CD"| NamingConvention |
| 141 | + Scripts -->|"CI/CD"| Aggregated |
| 142 | + Scripts -->|"CI/CD"| Tests |
| 143 | +
|
| 144 | + %% Click Events |
| 145 | + click Website "https://github.com/rel1cx/eslint-react/tree/main/apps/website" |
| 146 | + click Playground "https://github.com/rel1cx/eslint-react/tree/main/apps/playground" |
| 147 | + click Core "https://github.com/rel1cx/eslint-react/tree/main/packages/core" |
| 148 | + click Shared "https://github.com/rel1cx/eslint-react/tree/main/packages/shared" |
| 149 | + click AST "https://github.com/rel1cx/eslint-react/tree/main/packages/utilities/ast" |
| 150 | + click Eff "https://github.com/rel1cx/eslint-react/tree/main/packages/utilities/eff" |
| 151 | + click JSX "https://github.com/rel1cx/eslint-react/tree/main/packages/utilities/jsx" |
| 152 | + click Kit "https://github.com/rel1cx/eslint-react/tree/main/packages/utilities/kit" |
| 153 | + click Var "https://github.com/rel1cx/eslint-react/tree/main/packages/utilities/var" |
| 154 | + click ReactX "https://github.com/rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x" |
| 155 | + click ReactDOM "https://github.com/rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom" |
| 156 | + click WebAPI "https://github.com/rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-web-api" |
| 157 | + click HooksExtra "https://github.com/rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-hooks-extra" |
| 158 | + click NamingConvention "https://github.com/rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-naming-convention" |
| 159 | + click Aggregated "https://github.com/rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin" |
| 160 | + click Scripts "https://github.com/rel1cx/eslint-react/tree/main/scripts" |
| 161 | + click Tests "https://github.com/rel1cx/eslint-react/tree/main/test" |
| 162 | +
|
| 163 | + %% Styles |
| 164 | + classDef apps fill:#f9e79f,stroke:#7d6608,stroke-width:2px; |
| 165 | + classDef packages fill:#aed6f1,stroke:#1b4f72,stroke-width:2px; |
| 166 | + classDef utilities fill:#a9dfbf,stroke:#145a32,stroke-width:2px; |
| 167 | + classDef plugins fill:#f5b7b1,stroke:#78281f,stroke-width:2px; |
| 168 | + classDef external fill:#d2b4de,stroke:#4a235a,stroke-width:2px; |
| 169 | +``` |
0 commit comments