Commit ba7bd51
feat(linter): implement no-useless-return rule (#16388)
Implement `eslint/no-useless-return` rule.
Disallows redundant return statements that have no effect on function
behavior.
## Test
- 27 valid / 25 invalid test cases
- `just ready` passes
Note: `globalReturn` cases excluded (unsupported by oxc)
Part of #479
---------
Co-authored-by: Cameron Clark <cameron.clark@hey.com>1 parent 96843a8 commit ba7bd51
File tree
4 files changed
+844
-0
lines changed- crates/oxc_linter/src
- generated
- rules/eslint
- snapshots
4 files changed
+844
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
870 | 870 | | |
871 | 871 | | |
872 | 872 | | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
873 | 879 | | |
874 | 880 | | |
875 | 881 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
| 172 | + | |
172 | 173 | | |
173 | 174 | | |
174 | 175 | | |
| |||
800 | 801 | | |
801 | 802 | | |
802 | 803 | | |
| 804 | + | |
803 | 805 | | |
804 | 806 | | |
805 | 807 | | |
| |||
0 commit comments