nursery/noConvexQueryFilter
nursery · since 2.6.10
No autofixRecommended
biome.json
{
"linter": {
"rules": {
"nursery": {
"noConvexQueryFilter": "error"
}
}
}
}const messages = await ctx.db
.query("messages")
.filter((q) => q.eq(q.field("author"), args.author))
.collect();const query = ctx.db.query("messages");
const messages = await query.filter((q) => q.eq(q.field("author"), args.author)).collect();const messages = await ctx.db
.query("messages")
.withIndex("by_author", (q) => q.eq("author", args.author))
.collect();
const allMessages = await ctx.db.query("messages").collect();
const authorMessages = allMessages.filter((message) => message.author === args.author);Examples from the Biome documentation.
ESLint does not have this rule.
Oxlint does not have this rule.
nursery/noConvexQueryFilter
nursery · since 2.6.10
{
"linter": {
"rules": {
"nursery": {
"noConvexQueryFilter": "error"
}
}
}
}Disallow reading the current time or generating random values in Convex queries.
Require the object syntax when registering Convex queries, mutations, and actions.
Disallow scheduling Convex cron jobs at the start of the hour.
Disallow Convex database indexes whose fields are the first fields of another index on the same table.