Commit 913d51f
feat: Eslint disposable test hooks (#49)
* add eslint rule to prefer disposables over test hooks
Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
* fix lint order and rule test harness paths
Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
* Fix hook detection for known test hooks
* Fix outer write detection for destructuring
* Fix known framework hooks for suite hooks
* document dispose rule and migrate tests to RuleTester
Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
* organize eslint rule assets under eslint-rules
Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
* optimize custom rule for oxlint js plugins
Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
* handle null context options in oxlint compat path
Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
* compute source and options in before hook for compat
Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
* rename eslint-rules directory to lint-rules
Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
* align prefer-dispose docs and plugin with main lint-rules layout
Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
* enable prefer-dispose rule in oxlint config
Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
---------
Co-authored-by: Cursor Agent <cursoragent@cursor.com>1 parent e664169 commit 913d51f
9 files changed
Lines changed: 872 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
251 | 251 | | |
252 | 252 | | |
253 | 253 | | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
254 | 261 | | |
255 | 262 | | |
256 | 263 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| 11 | + | |
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
| 16 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
0 commit comments