Skip to content
Merged
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
341 commits
Select commit Hold shift + click to select a range
beb2525
style: use dprint for imports and exports sorting
Rel1cx Aug 17, 2025
abbaa90
chore: minor fixes
Rel1cx Aug 17, 2025
df52cd5
chore(website): enable '@eslint-react/no-unused-props' rule
Rel1cx Aug 17, 2025
f08fdf8
chore(website): minor fixes
Rel1cx Aug 17, 2025
e53fec2
release: 2.0.0-beta.33
Rel1cx Aug 18, 2025
68a8775
Merge branch 'main' into 2.0.0-beta
Rel1cx Aug 18, 2025
2dddf88
chore: update lucide-react to version 0.540.0
Rel1cx Aug 18, 2025
717fe4c
feat: add `no-unused-props` rule to `recommended-type-checked` preset…
Rel1cx Aug 18, 2025
09cca7b
release: 2.0.0-beta.34
Rel1cx Aug 18, 2025
4c0f56d
docs: improve examples in `react-x/no-unused-props` (#1179)
Rel1cx Aug 18, 2025
f6f0f89
chore: remove ununsed files
Rel1cx Aug 18, 2025
5c2ef9b
chore: update deps
Rel1cx Aug 18, 2025
831529e
chore: update deps
Rel1cx Aug 19, 2025
65a33e3
chore: remove ununsed code
Rel1cx Aug 19, 2025
c038699
chore: update contributing docs
Rel1cx Aug 19, 2025
0780100
feat: add vitest mock env detection, closes #1181 (#1182)
Rel1cx Aug 19, 2025
29eff3f
release: 2.0.0-beta.35
Rel1cx Aug 19, 2025
79256e1
chore: update deps
Rel1cx Aug 20, 2025
4cff122
refactor: move context detection utilities to `kit` package (#1183)
Rel1cx Aug 20, 2025
6a816cf
release: 2.0.0-beta.36
Rel1cx Aug 20, 2025
d2284e4
ci: update branches in publish workflow
Rel1cx Aug 20, 2025
b5f5f69
release: 2.0.0-beta.37
Rel1cx Aug 20, 2025
6a67592
release: 2.0.0-next.137
Rel1cx Aug 20, 2025
aac93d0
fix: improve hook detection logic and vi.mock utilities (#1184)
Rel1cx Aug 20, 2025
6369062
release: 2.0.0-next.138
Rel1cx Aug 20, 2025
9bd6a60
release: 2.0.0-beta.38
Rel1cx Aug 20, 2025
cd5befe
chore: update dprint plugins
Rel1cx Aug 20, 2025
e352f62
feat(naming-convention/filename): enhance default excepts patterns an…
Rel1cx Aug 20, 2025
bd874c0
release: 2.0.0-beta.39
Rel1cx Aug 20, 2025
57cf17a
release: 2.0.0-next.139
Rel1cx Aug 20, 2025
27a6663
docs: standardize implementation section titles (#1186)
Rel1cx Aug 20, 2025
063f504
ci: update actions/checkout to v5 in workflow files
Rel1cx Aug 21, 2025
cbd2154
release: 2.0.0-next.140
Rel1cx Aug 21, 2025
cc6b877
release: 2.0.0-beta.40
Rel1cx Aug 21, 2025
75cd295
refactor(website): improve theme
Rel1cx Aug 21, 2025
83c2edc
Merge branch 'main' into 2.0.0
Rel1cx Aug 21, 2025
40647eb
chore: remove ununsed deps
Rel1cx Aug 21, 2025
93a66f4
feat: add @effect/language-service dependency and update related scripts
Rel1cx Aug 22, 2025
8d4f03a
chore: update deps (#1189)
Rel1cx Aug 22, 2025
bd23a63
release: 2.0.0-next.141
Rel1cx Aug 22, 2025
7d06bfd
release: 2.0.0-beta.41
Rel1cx Aug 22, 2025
ac31323
refactor(scripts): migrate scripts to `effect` and `effect-platform` …
Rel1cx Aug 22, 2025
a0e5b1f
refactor(scripts): minor improvements
Rel1cx Aug 22, 2025
a7b5ba3
chore: remove unused code
Rel1cx Aug 23, 2025
a260662
release: 2.0.0-next.142
Rel1cx Aug 23, 2025
5ccd5d4
release: 2.0.0-beta.42
Rel1cx Aug 23, 2025
3ed0860
chore: reformat mdx
Rel1cx Aug 23, 2025
3ecda4d
fix: update documentation glob pattern to include .mdx files
Rel1cx Aug 23, 2025
0d949b5
chore: add --concurrency=auto to eslint
Rel1cx Aug 24, 2025
574721a
chore(examples): add --concurrency=auto to eslint
Rel1cx Aug 24, 2025
3717079
fix: disable-conflict-eslint-plugin-react config (#1191)
Dremora Aug 24, 2025
5080f64
release: 2.0.0-next.143
Rel1cx Aug 24, 2025
a4c9f55
release: 2.0.0-beta.43
Rel1cx Aug 24, 2025
a3e5280
chore: update zod to version 4.1.1 and fix package descriptions
Rel1cx Aug 24, 2025
330cc4c
feat: update rule metadata generation and add missing rules to docume…
Rel1cx Aug 24, 2025
7ae4c1a
chore: minor fixes
Rel1cx Aug 24, 2025
78d1666
chore: update dprint markup_fmt plugin to version 0.23.2
Rel1cx Aug 24, 2025
52e39c2
fix: update README links to use correct paths and enhance update script
Rel1cx Aug 24, 2025
b857d9c
release: 2.0.0-next.144
Rel1cx Aug 24, 2025
c0e5215
release: 2.0.0-beta.44
Rel1cx Aug 24, 2025
30132ad
chore: rename examples (#1192)
Rel1cx Aug 25, 2025
6b8c7e2
release: 2.0.0-next.145
Rel1cx Aug 25, 2025
43e23c0
release: 2.0.0-next.146
Rel1cx Aug 25, 2025
5ea7424
feat(scripts): reset nx cache when lockfile is outdated
Rel1cx Aug 25, 2025
bf96c43
feat(tooling): migrate to tsdown for bundling (#1193)
Rel1cx Aug 25, 2025
781a7f8
release: 2.0.0-next.147
Rel1cx Aug 25, 2025
d9c5856
release: 2.0.0-beta.47
Rel1cx Aug 25, 2025
844d690
release: 2.0.0-next.148
Rel1cx Aug 26, 2025
a33f268
fix: rule name and message id key mismatch in `no-nested-lazy-compone…
Rel1cx Aug 26, 2025
9dab0d1
release: 2.0.0-beta.48
Rel1cx Aug 26, 2025
e967d43
feat: add `react-x/no-unnecessary-key`, closes #950 (#1196)
Rel1cx Aug 26, 2025
856e017
release: 2.0.0-next.149
Rel1cx Aug 26, 2025
9b58d31
release: 2.0.0-beta.49
Rel1cx Aug 26, 2025
4681a80
docs: minor improvements
Rel1cx Aug 26, 2025
a479f05
release: 2.0.0-next.150
Rel1cx Aug 26, 2025
3fe5aae
refactor(core): restructure component detection APIs (#1197)
Rel1cx Aug 26, 2025
0c2f8e9
release: 2.0.0-next.151
Rel1cx Aug 26, 2025
d6d922a
build: remove nx (#1198)
Rel1cx Aug 27, 2025
230aa52
release: 2.0.0-next.152
Rel1cx Aug 27, 2025
9b5c3d6
release: 2.0.0-beta.52
Rel1cx Aug 27, 2025
40bf325
chore: update fumadocs
Rel1cx Aug 27, 2025
29798df
refactor: reorganize AST and utilities structure (#1199)
Rel1cx Aug 27, 2025
78e70b8
release: 2.0.0-next.153
Rel1cx Aug 27, 2025
e2217ea
release: 2.0.0-beta.53
Rel1cx Aug 27, 2025
1476353
fix: add ESLint compatibility types and update plugins exports, close…
Rel1cx Aug 28, 2025
7c38c6e
release: 2.0.0-next.154
Rel1cx Aug 28, 2025
552a2e5
release: 2.0.0-beta.54
Rel1cx Aug 28, 2025
51d0f7c
docs: update changelog
Rel1cx Aug 28, 2025
b9a39a1
chore: remove ununsed code
Rel1cx Aug 28, 2025
446e29b
refactor: minor improvements
Rel1cx Aug 28, 2025
e65e3da
refactor: update `dom/no-unknown-property` rule implementation (#1202)
Rel1cx Aug 28, 2025
21cffbc
fix: ensure single default export in unified plugin entry
Rel1cx Aug 29, 2025
b79c1fe
release: 2.0.0-next.155
Rel1cx Aug 29, 2025
155afaf
release: 2.0.0-beta.55
Rel1cx Aug 29, 2025
a2b83d6
docs: update changelog
Rel1cx Aug 29, 2025
3935d6f
refactor: code optimization (#1205)
Rel1cx Aug 29, 2025
551c5a2
release: 2.0.0-next.156
Rel1cx Aug 29, 2025
c2e30ac
refactor: minor improvements
Rel1cx Aug 29, 2025
a9c5a81
chore: remove ununsed deps
Rel1cx Aug 29, 2025
31a6aa9
docs: remove lynx example directory and update dependencies (#1206)
Rel1cx Aug 29, 2025
cb506c8
chore: update CONTRIBUTING.md
Rel1cx Aug 29, 2025
2f43cc3
fix: issue introduced in version 1.52.7 where the react-hooks-extra r…
Rel1cx Aug 30, 2025
cec28db
release: 2.0.0-next.157
Rel1cx Aug 30, 2025
0c9fc65
release: 2.0.0-beta.57
Rel1cx Aug 30, 2025
211c610
docs: update changelog
Rel1cx Aug 30, 2025
a878b8f
refactor: refine plugin configuration types (#1209)
Rel1cx Aug 30, 2025
9e2fdf6
release: 2.0.0-next.158
Rel1cx Aug 30, 2025
8817775
release: 2.0.0-beta.58
Rel1cx Aug 30, 2025
8a86b93
docs: minor improvements
Rel1cx Aug 31, 2025
a0bbbd8
refactor: improve compatible types (#1210)
Rel1cx Aug 31, 2025
f867766
release: 2.0.0-next.159
Rel1cx Aug 31, 2025
ddf5e8d
release: 2.0.0-beta.59
Rel1cx Aug 31, 2025
d6af21c
chore: update fumadocs
Rel1cx Aug 31, 2025
7512014
refactor: replace custom config functions with getConfigAdapters util…
Rel1cx Sep 1, 2025
7219018
release: 2.0.0-next.160
Rel1cx Sep 1, 2025
8ec76d3
release: 2.0.0-beta.60
Rel1cx Sep 1, 2025
20f6088
release: 2.0.0-next.61
Rel1cx Sep 1, 2025
32d4ae1
refactor: minor improvements
Rel1cx Sep 1, 2025
59051b8
release: 2.0.0-next.162
Rel1cx Sep 1, 2025
1597761
release: 2.0.0-next.163
Rel1cx Sep 2, 2025
07ab70f
release: 2.0.0-beta.63
Rel1cx Sep 2, 2025
8a541e0
docs: replace `tseslint.config` with `defineConfig` (#1214)
Rel1cx Sep 2, 2025
f9e0bcf
release: 2.0.0-next.164
Rel1cx Sep 2, 2025
8c1dc50
release: 2.0.0-beta.64
Rel1cx Sep 2, 2025
403a7c9
docs: minor improvements
Rel1cx Sep 2, 2025
945b6e8
docs: minor improvements (#1215)
Rel1cx Sep 2, 2025
7baa84e
docs: fix hooks extra rules missing in rules index
Rel1cx Sep 2, 2025
7bf86c1
chore: update effect
Rel1cx Sep 2, 2025
0db1a8f
chore: add editor config for Zed
Rel1cx Sep 3, 2025
8f434be
docs: minor fixes
Rel1cx Sep 3, 2025
4c25203
chore: update deps
Rel1cx Sep 3, 2025
cb187cb
fix(naming-convention/filename): update regex patterns in default opt…
Rel1cx Sep 3, 2025
a2c3c77
release: 2.0.0-next.165
Rel1cx Sep 3, 2025
4ce979b
release: 2.0.0-beta.65
Rel1cx Sep 3, 2025
cc9c9fb
docs: update changelog
Rel1cx Sep 3, 2025
c513dfc
refactor: rename error message IDs to be more consistent
Rel1cx Sep 3, 2025
b5e7573
release: 2.0.0-next.166
Rel1cx Sep 3, 2025
b87db74
chore: update deps
Rel1cx Sep 4, 2025
b0c37b3
release: 2.0.0-beta.66
Rel1cx Sep 4, 2025
684595b
chore: minor fixes
Rel1cx Sep 4, 2025
d531e77
chore(local/configs): replace `tseslint.config` with `defineConfig`
Rel1cx Sep 5, 2025
fd2c981
feat: enhance `dom/no-string-style-prop` rule to support custom compo…
Rel1cx Sep 5, 2025
8d72b67
release: 2.0.0-next.167
Rel1cx Sep 5, 2025
5b8a8c1
release: 2.0.0-beta.67
Rel1cx Sep 5, 2025
1dfb283
chore: update deps
Rel1cx Sep 5, 2025
181d794
release: 2.0.0-next.168
Rel1cx Sep 5, 2025
48b7c6d
chore: remove ununsed imports
Rel1cx Sep 6, 2025
ccd69e1
feat: new jsx element and attribute resolution for dom rules (#1219)
Rel1cx Sep 6, 2025
b721efd
release: 2.0.0-next.169
Rel1cx Sep 6, 2025
ecc68d5
refactor: replace `toStaticValue` with `getStaticValue` (#1220)
Rel1cx Sep 6, 2025
b048f6e
release: 2.0.0-next.170
Rel1cx Sep 6, 2025
ad0354e
release: 2.0.0-beta.170
Rel1cx Sep 6, 2025
77e387e
refactor(var): rename utility files and improve code organization (#1…
Rel1cx Sep 6, 2025
ed11ae6
release: 2.0.0-next.171
Rel1cx Sep 6, 2025
a17ccac
release: 2.0.0-beta.171
Rel1cx Sep 6, 2025
5abf842
fix: allow string style prop on non-host elements in `dom/no-string-s…
Rel1cx Sep 6, 2025
8af8343
release: 2.0.0-next.172
Rel1cx Sep 6, 2025
e06367d
release: 2.0.0-beta.172
Rel1cx Sep 6, 2025
23f7880
chore: update deps
Rel1cx Sep 6, 2025
76d577e
docs: enhance feature and rule request issue templates (#1223)
Rel1cx Sep 7, 2025
bf9472c
chore: minor improvements
Rel1cx Sep 7, 2025
4135f2f
refactor: rework hooks rules (#1225)
Rel1cx Sep 8, 2025
ceaf0bd
release: 2.0.0-next.173
Rel1cx Sep 8, 2025
c2c0369
release: 2.0.0-beta.173
Rel1cx Sep 8, 2025
2648e36
release: 2.0.0-next.174
Rel1cx Sep 8, 2025
38757a2
release: 2.0.0-beta.174
Rel1cx Sep 8, 2025
791eacd
docs: minor fixes
Rel1cx Sep 8, 2025
7811324
docs: update roadmap
Rel1cx Sep 8, 2025
2317a46
fix: fix scope check in `no-unnecessary-key` rule (#1226)
Rel1cx Sep 8, 2025
1dc952b
release: 2.0.0-next.175
Rel1cx Sep 8, 2025
1f18377
release: 2.0.0-beta.175
Rel1cx Sep 8, 2025
2a950fd
release: 2.0.0-next.176
Rel1cx Sep 9, 2025
e283122
release: 2.0.0-beta.176
Rel1cx Sep 9, 2025
30851a5
docs: minor fixes
Rel1cx Sep 9, 2025
9403832
release: 2.0.0-next.177
Rel1cx Sep 10, 2025
432beb0
release: 2.0.0-beta.177
Rel1cx Sep 10, 2025
cf8b5e6
chore: remove cspell and its deps
Rel1cx Sep 10, 2025
e81483a
fix: fix useEffect setup function check in web-api/no-leaked-event-li…
Rel1cx Sep 10, 2025
33ebb92
release: 2.0.0-next.178
Rel1cx Sep 10, 2025
cefd50a
release: 2.0.0-beta.178
Rel1cx Sep 10, 2025
831b6d1
docs: update contributing guide for clarity and consistency
Rel1cx Sep 11, 2025
fbeba5d
chore: improve local config types
Rel1cx Sep 11, 2025
b60ff88
feat: Remove Language Preference from codebase (#1230)
Rel1cx Sep 11, 2025
af83bb1
refactor: cleanup utilities (#1231)
Rel1cx Sep 11, 2025
0a105c5
release: 2.0.0-next.179
Rel1cx Sep 11, 2025
03b1a1b
release: 2.0.0-beta.179
Rel1cx Sep 11, 2025
3ae92b8
chore: fix npm scripts
Rel1cx Sep 11, 2025
c93e826
release: 2.0.0-next.180
Rel1cx Sep 12, 2025
35aa8f4
release: 2.0.0-beta.180
Rel1cx Sep 12, 2025
db805b7
chore: enable pnpm stream log output (#1232)
Rel1cx Sep 12, 2025
3be4456
refactor: minor improvements
Rel1cx Sep 12, 2025
8782844
chore: update deps
Rel1cx Sep 13, 2025
6ca26b3
chore: minor improvements
Rel1cx Sep 13, 2025
5e56cfa
release: 2.0.0-next.181
Rel1cx Sep 13, 2025
5e1493d
chore: update deps
Rel1cx Sep 15, 2025
86ab332
release: 2.0.0-next.182
Rel1cx Sep 15, 2025
3269e3f
ci: add check-provenance workflow
Rel1cx Sep 16, 2025
54cec72
release: 2.0.0-next.183
Rel1cx Sep 16, 2025
29d841a
release: 2.0.0-beta.183
Rel1cx Sep 16, 2025
f214a0c
release: 2.0.0-next.184
Rel1cx Sep 16, 2025
a5d87bf
release: 2.0.0-beta.184
Rel1cx Sep 16, 2025
d1657d2
release: 2.0.0-next.185
Rel1cx Sep 17, 2025
11348e9
release: 2.0.0-beta.185
Rel1cx Sep 17, 2025
34e2c72
chore: remove ununsed deps
Rel1cx Sep 17, 2025
850bbf9
chore: remove ununsed deps
Rel1cx Sep 17, 2025
83a4fe6
release: 2.0.0-next.186
Rel1cx Sep 18, 2025
d6c6902
chore: remove git hooks
Rel1cx Sep 18, 2025
26769f3
release: 2.0.0-next.187
Rel1cx Sep 18, 2025
112ead1
release: 2.0.0-beta.187
Rel1cx Sep 18, 2025
575d46f
fix: make quotes consistent (#1234)
karlhorky Sep 19, 2025
615d374
fix: fix package structure for ast and kit packages (#1235)
Rel1cx Sep 19, 2025
6dfaa70
release: 2.0.0-next.188
Rel1cx Sep 19, 2025
c7f6dcc
release: 2.0.0-next.188
Rel1cx Sep 19, 2025
ceca649
release: 2.0.0-beta.188
Rel1cx Sep 19, 2025
3c61bc9
chore: pin package versions to git SHAs in GitHub Actions
Rel1cx Sep 20, 2025
ac7a85d
release: 2.0.0-next.189
Rel1cx Sep 21, 2025
a781f07
release: 2.0.0-beta.189
Rel1cx Sep 21, 2025
1cbfbfb
feat(website): remove IBM Plex Mono font usage
Rel1cx Sep 21, 2025
a6c3610
docs: update changelog
Rel1cx Sep 21, 2025
e7219e0
docs: update changelog
Rel1cx Sep 21, 2025
229dd01
chore: update TypeScript peer dependency and requirements
Rel1cx Sep 21, 2025
821e5f3
docs: update changelog
Rel1cx Sep 21, 2025
b55417d
docs: update changelog
Rel1cx Sep 22, 2025
876082e
release: 2.0.0-next.190
Rel1cx Sep 22, 2025
4615d4c
feat: remove eslint legacy config support (#1236)
Rel1cx Sep 22, 2025
0248fa1
docs: update presets docs
Rel1cx Sep 22, 2025
f9fb456
docs: update changelog
Rel1cx Sep 22, 2025
d8776a1
release: 2.0.0-beta.190
Rel1cx Sep 22, 2025
706ce35
chore: update eslint-plugin-react-refresh and @eslint/markdown versions
Rel1cx Sep 22, 2025
b524f4d
release: 2.0.0-next.191
Rel1cx Sep 23, 2025
e2db345
release: 2.0.0-beta.191
Rel1cx Sep 23, 2025
77a5428
chore: update dependencies to latest versions
Rel1cx Sep 24, 2025
95f1f1c
chore: fix typo
Rel1cx Sep 24, 2025
b0ee801
docs: update changelog
Rel1cx Sep 24, 2025
7d137b6
docs: update changelog
Rel1cx Sep 24, 2025
1d5da0a
release: 2.0.0-next.192
Rel1cx Sep 24, 2025
c83c188
release: 2.0.0-beta.192
Rel1cx Sep 24, 2025
071c13a
docs: update roadmap
Rel1cx Sep 24, 2025
8926cf2
docs: update changelog and roadmap
Rel1cx Sep 24, 2025
0c5126e
docs: update changelog
Rel1cx Sep 24, 2025
bc58369
docs: update roadmap
Rel1cx Sep 24, 2025
9e6d1f6
chore: update deps
Rel1cx Sep 25, 2025
42c73c4
docs: update changelog and add removed rules documentation
Rel1cx Sep 25, 2025
4088052
release: 2.0.0-next.193
Rel1cx Sep 25, 2025
21c7670
release: 2.0.0-beta.193
Rel1cx Sep 25, 2025
8e8160c
release: 2.0.0-beta.193
Rel1cx Sep 25, 2025
64823ca
chore: cleanup
Rel1cx Sep 25, 2025
5a8c513
Update packages/plugins/eslint-plugin-react-hooks-extra/package.json
Rel1cx Sep 25, 2025
865444e
release: 2.0.0-next.194
Rel1cx Sep 25, 2025
52152a2
release: 2.0.0-beta.194
Rel1cx Sep 25, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
90 changes: 75 additions & 15 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,86 @@
# ESLint React Contributing Guide

Thank you for your interest in contributing to ESLint React! This guide will help you understand how to contribute effectively.
Welcome to contributing to ESLint React! This guide will help you contribute effectively.

> [!NOTE]
> ESLint React is not a fork of or derived from `eslint-plugin-react`. Features in `eslint-plugin-react` may not appear in ESLint React.

## Issue Reporting Guidelines
## Issue Reporting Guide

- **Search First** - Your issue may already be addressed
- **Verify Version** - Confirm reproducibility with the latest stable release
- **Clear Reproduction Steps Required** - Detailed steps to reproduce are essential
- **Minimal Code Example** - Provide only the code necessary to demonstrate the issue
- **Be Patient** - The team balances many responsibilities
- **Search first**: Your issue may have already been reported.
- **Verify version**: Ensure the issue is reproducible in the latest stable version.
- **Provide clear reproduction steps**.
- **Provide a minimal reproducible code example**.

## Pull Request Guidelines
## Pull Request Guide

- **Sign Your Commits** - Ensure your commits are signed
- **Multiple Small Commits Allowed** - GitHub will squash before merging
- **New Features** - Provide strong rationale, preferably with prior discussion
- **Bug Fixes** - Include `(fix: #xxxx)` in your PR title and detailed description
- **Documentation Changes** - Include `(docs: #xxxx)` in your PR title and detailed description
- **Sign your commits**.
- **Small commits are welcome**: We will squash them before merging.
- **New features**: Please provide a good reason, preferably by discussing it in an Issue first.
- **Bug fixes**: Include `(fix: #xxxx)` in the PR title.
- **Documentation changes**: Include `(docs: #xxxx)` in the PR title.

## References
## Development Commands

- [Monorepo Structure](https://eslint-react.xyz/docs/contributing#monorepo-structure)
### Build

```bash
# Build packages that are needed for development and publishing
pnpm run build

# Build packages that are used in the monorepo (e.g., plugins, configs)
pnpm run build:pkgs

# Build docs for all packages
pnpm run build:docs

# Build the website
pnpm run build:website
```

### Testing

```bash
# Run all tests
pnpm run test

# Run a single test file
pnpm vitest packages/plugins/eslint-plugin-react-x/src/rules/[rule-name].spec.ts
```

### Code Linting and Formatting

```bash
# Format the code
pnpm run format:write

# Run all checks
pnpm run lint
```

## Development Workflow

### Testing

- Test files coexist with source files: `src/rules/[rule-name].spec.ts`.
- Uses `TypeScript ESLint Rule Tester`.
- Provides separate test setups for type-aware and non-type-aware rules.
- Test fixtures support multiple TypeScript configurations (e.g., JSX variants).
- Test helpers are located in the `test/` directory.

### Developing a New Rule

1. If there isn't a related Issue, create one first to discuss the new rule.
2. Implement the rule in the plugin's `src/rules/` directory.
3. Create the corresponding test file.
4. Export the rule in the plugin's entry file (`src/plugin.ts`).
5. Add documentation for the rule.
6. If the rule should be enabled by default, update the preset configurations.
7. Update the unified plugin to include the new rule.
8. Update the website documentation.
9. Run build and test commands.
10. Submit a PR with a clear description of the changes.

## Reference

- [Monorepo Structure](https://beta.eslint-react.xyz/docs/contributing#monorepo-structure)
62 changes: 48 additions & 14 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,66 @@ description: Suggest an idea
labels: ["feature request"]

body:
- type: markdown
attributes:
value: |
## Feature Request

Thank you for suggesting a new feature! Before submitting, please ensure your request meets our contribution guidelines.
- type: textarea
id: problem
attributes:
label: Describe the problem
description: A clear description of the problem this feature would solve
placeholder: "I'm always frustrated when..."
label: Problem Description
description: Please describe the problem this feature will solve. Provide specific examples to illustrate the issue.
placeholder: "This feature will solve..."
validations:
required: true

- type: textarea
id: solution
id: alternative-solutions
attributes:
label: "Describe the solution you'd like"
description: A clear description of what change you would like
placeholder: "I would like to..."
label: Alternative Solutions
description: Have you tried to solve the problem by other means? Why aren't these methods sufficient to solve the problem?
placeholder: "I've tried..."
validations:
required: false
required: true

- type: textarea
id: alternatives
id: feature-details
attributes:
label: Alternatives considered
description: "Any alternative solutions you've considered"
label: Feature Details
description: Suggest a name for the feature, as well as details about how it should work and any relevant use cases.
placeholder: |
Feature name: [FeatureName]

Details: Provide more background information and suggested implementation details
validations:
required: true

- type: textarea
id: context
id: examples
attributes:
label: Examples
description: Provide examples of how this feature would be used in practice.
placeholder: |
Example usage:
```tsx
// Example code demonstrating the feature
```
validations:
required: true

- type: checkboxes
id: checklist
attributes:
label: Additional context
description: Add any other context about the problem here.
label: Evaluation Checklist
description: Please check the following items to ensure the feature suggestion is reasonable
options:
- label: I have had problems that this feature would solve
required: true
- label: I could not find a way to solve the problem with existing features or workarounds
required: true
- label: I have thought very hard about potential edge cases and downsides, and they are acceptable
required: true
- label: I think the feature is well-defined and would provide clear value to users
required: true
86 changes: 86 additions & 0 deletions .github/ISSUE_TEMPLATE/rule_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: 💬 Rule Request
title: "[rule] "
description: Suggest a rule
labels: ["rule request"]

body:
- type: markdown
attributes:
value: |
## Rule Request

Thank you for suggesting a new rule! Before submitting, please ensure your request meets our rule writing standards.

## References on Rule Design
- [What makes a good rule](https://package.elm-lang.org/packages/jfmengels/elm-review/latest/Review-Rule#what-makes-a-good-rule)
- [When to write or enable a rule](https://package.elm-lang.org/packages/jfmengels/elm-review/latest#when-to-write-or-enable-a-rule)

- type: textarea
id: problem
attributes:
label: Problem Description
description: Please describe what problem this rule will solve. Provide specific code examples to illustrate the issue.
placeholder: "This rule will solve..."
validations:
required: true

- type: textarea
id: alternative-solutions
attributes:
label: Alternative Solutions
description: Have you tried to solve the problem by changing the API or introducing a new API? Why aren't these methods sufficient to solve the problem?
placeholder: "I've tried..."
validations:
required: true

- type: textarea
id: rule-name-and-message
attributes:
label: Rule Name and Error Message
description: |
Suggest a name for the rule, as well as the error message and details that should be displayed when the rule is violated.

> A lint rule is an automated communication tool which sends messages to developers who have written patterns your rule wishes to prevent. As all communication, the message is important.
placeholder: |
Rule name: [PluginName]/[YourRuleName]

Error message: Briefly and clearly describe the problem

Details: Provide more background information and suggested solutions
validations:
required: true

- type: textarea
id: examples
attributes:
label: Examples
description: Provide code examples that should be flagged and code examples that should not be flagged.
placeholder: |
Code that should be flagged:
```tsx
// Problematic code
```

Code that should not be flagged:
```tsx
// Correct code
```
validations:
required: true

- type: checkboxes
id: checklist
attributes:
label: Evaluation Checklist
description: Please check the following items to ensure the rule suggestion is reasonable
options:
- label: I have had problems with the pattern I want to forbid
required: true
- label: I could not find a way to solve the problem by changing the API of the problematic code or introducing a new API
required: true
- label: I have thought very hard about what the corner cases could be and what kind of patterns this would forbid that are actually okay, and they are acceptable
required: true
- label: I think the rule explains well enough how to solve the issue, to make sure beginners are not blocked by it
required: true
- label: I have discussed this rule with team members, and they all find it valuable
required: false
30 changes: 30 additions & 0 deletions .github/workflows/check-provenance.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Check Provenance
on:
push:
branches:
- main
- "2.0.0"
pull_request:
types: [opened, edited, reopened, synchronize]
branches:
- main
- "2.0.0"
permissions:
contents: read
jobs:
check-provenance:
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
fetch-depth: 0
- name: Check provenance downgrades
uses: danielroe/provenance-action@main
id: check
with:
fail-on-provenance-change: true # optional, default: false
lockfile: pnpm-lock.yaml # optional
# base-ref: origin/main # optional, default: origin/main
fail-on-downgrade: true # optional, default: true
- name: Print result
run: "echo 'Downgraded: ${{ steps.check.outputs.downgraded }}'"
15 changes: 8 additions & 7 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Check
on:
push:
branches:
- main
- "**"
pull_request:
types: [opened, edited, reopened, synchronize]
branches:
Expand All @@ -13,13 +13,14 @@ jobs:
check:
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@v4
- name: Setup node@23
uses: actions/setup-node@v4
- name: Setup node@24
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
with:
node-version: 23
- name: Enable Corepack
run: corepack enable
node-version: 24
- name: Install pnpm
run: npm install -g pnpm
- name: Checkout repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Install front-end dependencies
run: pnpm install
- name: Build front-end assets
Expand Down
15 changes: 8 additions & 7 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
push:
branches:
- main
- "2.0.0-next"
- "2.0.0"
tags-ignore:
- "**"
paths-ignore:
Expand All @@ -21,14 +21,15 @@ jobs:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- name: Setup node@23
uses: actions/setup-node@v4
- name: Setup node@24
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
with:
node-version: 23
node-version: 24
registry-url: "https://registry.npmjs.org"
- name: Enable Corepack
run: corepack enable
- name: Install pnpm
run: npm install -g pnpm
- name: Checkout repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Install dependencies
run: pnpm install
- name: Build front-end assets
Expand Down
Loading
Loading