Skip to content

Commit 5843032

Browse files
committed
Merge branch '2.0.0-beta' into 2.0.0-next
2 parents 10ca2b1 + c038699 commit 5843032

File tree

9 files changed

+216
-72
lines changed

9 files changed

+216
-72
lines changed

.github/CONTRIBUTING.md

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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)

apps/website/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"next-view-transitions": "^0.3.4",
3030
"react": "^19.1.1",
3131
"react-dom": "^19.1.1",
32-
"shiki": "^3.9.2",
32+
"shiki": "^3.10.0",
3333
"tailwind-merge": "^3.3.1",
3434
"twoslash": "^0.3.4"
3535
},

examples/vite-react-dom-app-v1/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@
2323
"@tsconfig/vite-react": "^7.0.0",
2424
"@types/react": "^19.1.10",
2525
"@types/react-dom": "^19.1.7",
26-
"@vitejs/plugin-react": "^5.0.0",
26+
"@vitejs/plugin-react": "^5.0.1",
2727
"eslint": "^9.33.0",
2828
"eslint-plugin-react-hooks": "^5.2.0",
2929
"eslint-plugin-react-refresh": "^0.4.20",
3030
"typescript": "^5.9.2",
3131
"typescript-eslint": "^8.40.0",
32-
"vite": "^7.1.2"
32+
"vite": "^7.1.3"
3333
},
3434
"engines": {
3535
"node": ">=20.19.0"

examples/vite-react-dom-app/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@
2323
"@tsconfig/vite-react": "^7.0.0",
2424
"@types/react": "^19.1.10",
2525
"@types/react-dom": "^19.1.7",
26-
"@vitejs/plugin-react": "^5.0.0",
26+
"@vitejs/plugin-react": "^5.0.1",
2727
"eslint": "^9.33.0",
2828
"eslint-plugin-react-hooks": "^5.2.0",
2929
"eslint-plugin-react-refresh": "^0.4.20",
3030
"typescript": "^5.9.2",
3131
"typescript-eslint": "^8.40.0",
32-
"vite": "^7.1.2"
32+
"vite": "^7.1.3"
3333
},
3434
"engines": {
3535
"node": ">=20.19.0"

examples/vite-react-dom-js-app/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@
2020
"@eslint/js": "^9.33.0",
2121
"@types/react": "^19.1.10",
2222
"@types/react-dom": "^19.1.7",
23-
"@vitejs/plugin-react": "^5.0.0",
23+
"@vitejs/plugin-react": "^5.0.1",
2424
"eslint": "^9.33.0",
2525
"eslint-plugin-react-hooks": "^5.2.0",
2626
"eslint-plugin-react-refresh": "^0.4.20",
2727
"globals": "^16.3.0",
28-
"vite": "^7.1.2"
28+
"vite": "^7.1.3"
2929
},
3030
"engines": {
3131
"node": ">=20.19.0"

examples/vite-react-dom-js-with-babel-eslint-parser-app/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"@types/babel__preset-env": "~7.10.0",
2626
"@types/react": "^19.1.10",
2727
"@types/react-dom": "^19.1.7",
28-
"@vitejs/plugin-react": "^5.0.0",
28+
"@vitejs/plugin-react": "^5.0.1",
2929
"eslint": "^9.33.0",
3030
"eslint-plugin-react-debug": "workspace:*",
3131
"eslint-plugin-react-dom": "workspace:*",
@@ -35,7 +35,7 @@
3535
"eslint-plugin-react-web-api": "workspace:*",
3636
"eslint-plugin-react-x": "workspace:*",
3737
"globals": "^16.3.0",
38-
"vite": "^7.1.2"
38+
"vite": "^7.1.3"
3939
},
4040
"engines": {
4141
"node": ">=20.19.0"

examples/vite-react-dom-with-ts-blank-eslint-parser-app/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@
2525
"@tsconfig/vite-react": "^7.0.0",
2626
"@types/react": "^19.1.10",
2727
"@types/react-dom": "^19.1.7",
28-
"@vitejs/plugin-react": "^5.0.0",
28+
"@vitejs/plugin-react": "^5.0.1",
2929
"eslint": "^9.33.0",
3030
"eslint-plugin-react-hooks": "^5.2.0",
3131
"eslint-plugin-react-refresh": "^0.4.20",
3232
"globals": "^16.3.0",
3333
"ts-blank-eslint-parser": "^0.4.3",
3434
"typescript": "^5.9.2",
3535
"typescript-eslint": "^8.40.0",
36-
"vite": "^7.1.2"
36+
"vite": "^7.1.3"
3737
},
3838
"engines": {
3939
"node": ">=20.19.0"

0 commit comments

Comments
 (0)