@@ -21,6 +21,94 @@ Thank you for your interest in contributing to ESLint React! This guide will hel
2121- ** Bug Fixes** - Include ` (fix: #xxxx) ` in your PR title and detailed description
2222- ** Documentation Changes** - Include ` (docs: #xxxx) ` in your PR title and detailed description
2323
24+ ## Development Commands
25+
26+ ### Build Commands
27+
28+ ``` bash
29+ # Build packages in packages directory (core, shared, utilities, plugins)
30+ pnpm run build
31+
32+ # Build packages in .pkgs directory (local configs)
33+ pnpm run build:pkgs
34+
35+ # Build documentation for all packages
36+ pnpm run build:docs
37+
38+ # Build website
39+ pnpm run build:website
40+ ```
41+
42+ ### Testing
43+
44+ ``` bash
45+ # Run all tests with Vitest
46+ pnpm run test
47+
48+ # Run a single test file
49+ pnpm vitest packages/plugins/eslint-plugin-react-x/src/rules/[rule-name].spec.ts
50+ ```
51+
52+ ### Linting & Formatting
53+
54+ ``` bash
55+ # Full lint check (deps, publish, TypeScript, ESLint, examples)
56+ pnpm run lint
57+
58+ # Individual lint commands
59+ pnpm run lint:deps # Check dependency cycles with skott
60+ pnpm run lint:ts # TypeScript check across packages
61+ pnpm run lint:es # ESLint check
62+ pnpm run lint:publish # Check package.json publishing config
63+ pnpm run lint:spell # Spell check with cspell
64+
65+ # Format code
66+ pnpm run format:write # Format with dprint
67+ pnpm run format:check # Check formatting
68+ ```
69+
70+ ### Development Utilities
71+
72+ ``` bash
73+ # Update project metadata
74+ pnpm run update:all # Update version, README, and website
75+ pnpm run update:version # Update version across packages
76+ pnpm run update:readme # Update README with generated content
77+ # pnpm run update:website # Update website content
78+
79+ # Package management
80+ pnpm run sort:package-json # Sort package.json files consistently
81+
82+ # Inspection tools
83+ pnpm run inspect:deps # Visualize dependency graph
84+ pnpm run inspect:eslint-config # Launch ESLint config inspector
85+ ```
86+
87+ ## Development Workflow
88+
89+ ### Testing
90+
91+ - Test files located alongside source: ` src/rules/[rule-name].spec.ts `
92+ - Uses TypeScript ESLint Rule Tester with custom configurations
93+ - Separate test setups for type-checked and non-type-checked rules
94+ - Test fixtures support multiple TypeScript configurations (JSX variants)
95+ - Helper functions in ` test/ ` directory for common test utilities
96+
97+ ### Working with Rules
98+
99+ When developing new ESLint rules:
100+
101+ 1 . Open an issue to discuss the rule's purpose and design if no existing issue exists
102+ 2 . Add rule implementation in appropriate plugin's ` src/rules/ ` directory
103+ 3 . Create corresponding test file using rule tester setup
104+ 4 . Export rule from plugin's main index file
105+ 5 . Add rule documentation with summary and examples
106+ 6 . Update presets/configs if rule should be included by default
107+ 7 . Update the unified plugin to include the new rule
108+ 8 . Update the website documentation with the new rule details
109+ 9 . Run the build and test commands to ensure everything works as expected
110+ 10 . Submit a pull request with clear description of the changes and any relevant issue links
111+
24112## References
25113
26114- [ Monorepo Structure] ( https://eslint-react.xyz/docs/contributing#monorepo-structure )
0 commit comments