-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
feat(eslint-plugin): [no-explicit-any] ignoreRestArgs #548
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report
@@ Coverage Diff @@
## master #548 +/- ##
==========================================
+ Coverage 94.19% 94.26% +0.06%
==========================================
Files 105 104 -1
Lines 4323 4252 -71
Branches 1185 1160 -25
==========================================
- Hits 4072 4008 -64
+ Misses 146 142 -4
+ Partials 105 102 -3
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution!
A few things for you:
- you need to add support for more cases of function definitions:
function foo1(...args: any[]) {}
const bar1 = function (...args: any[]) {}
const baz1 = (...args: any[]) => {}
// readonly array[]:
function foo2(...args: readonly any[]) {}
const bar2 = function (...args: readonly any[]) {}
const baz2 = (...args: readonly any[]) => {}
// generics
function foo3(...args: Array<any>) {}
const bar3 = function (...args: Array<any>) {}
const baz3 = (...args: Array<any>) => {}
function foo4(...args: ReadonlyArray<any>) {}
const bar4 = function (...args: ReadonlyArray<any>) {}
const baz4 = (...args: ReadonlyArray<any>) => {}
should these be valid as well? Technically they're valid typescript, but they make less sense semantically. Probably good to guard against them.
function foo5(...args: any) {}
const bar5 = function (...args: any) {}
const baz5 = (...args: any) => {}
- Please add examples to the docs to help explain the option's function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Closes #397