Commit 696aeed
committed
Removes arguments with leading
This allows `_` to be used as a prefix for unused variable names, which is a common annotation.
ESLint supports different options for variables, arguments, catch clauses, and destructured array. I opted to only allow this annotation for arguments and destructures because IMHO:
* Unused variables are extremely rare, only ocurring in `@rules_prerender` in type-only tests. Those variables are usually load bearing in a unique way and deserve an actual ignore comment, otherwise the meaning of the leading `_` is unclear.
* Catch clauses already support optional names, you can do `try {} catch {}`, so if the error is unused, the name should be omitted entirely._ from unused variable lint check.1 parent fa3a9d0 commit 696aeed
2 files changed
Lines changed: 13 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
43 | 49 | | |
44 | 50 | | |
45 | 51 | | |
| |||
62 | 68 | | |
63 | 69 | | |
64 | 70 | | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
65 | 78 | | |
66 | 79 | | |
67 | 80 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
31 | 30 | | |
32 | 31 | | |
33 | 32 | | |
| |||
37 | 36 | | |
38 | 37 | | |
39 | 38 | | |
40 | | - | |
41 | 39 | | |
42 | 40 | | |
43 | 41 | | |
| |||
0 commit comments