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
unicorn/no-fn-reference-in-iterator - wrong context #755
Comments
I can make a PR to ignore objects for now, but const results = await collection
.find(
foo, // <-- we can't tell what this is
{
projection: params.projection
})
.sort($sort)
.limit(params.limit + 1)
.toArray() still get reported. |
This message in issue description might misleading, the message is actually
|
- error Do not pass function `collection` directly to `.find(…)` unicorn/no-fn-reference-in-iterator
+ error Do not pass function directly to `.find(…)` unicorn/no-fn-reference-in-iterator There is no function name in that message. I thought that's also a bug, so I had to test it. |
@fisker sorry!! I copied error from other block!! my bad! // error eslint:unicorn/no-fn-reference-in-iterator Do not pass function `collection` directly to `.find(…)`.
const collection = t.context.db.collection('test_paging')
let res = await paging.find(collection, {
limit: 3
}) |
No problem. As I comment above, if you use object in |
With D3 delaunay error too.
I guess nothing can do about it. |
The lint is claiming a MongoDB query (
.find
)The text was updated successfully, but these errors were encountered: