nursery/useConvexArgsValidator
nursery · since 2.6.10
Unsafe autofixRecommended
biome.json
{
"linter": {
"rules": {
"nursery": {
"useConvexArgsValidator": "error"
}
}
}
}Require an args validator in Convex queries, mutations, and actions.
export const get = query({
handler: async (ctx, { id }: { id: Id<"tasks"> }) => {
return await ctx.db.get(id);
},
});export const list = query({
handler: async (ctx) => {
return await ctx.db.query("tasks").collect();
},
});export const list = query(async (ctx) => {
return await ctx.db.query("tasks").collect();
});export const get = query({
args: { id: v.id("tasks") },
handler: async (ctx, { id }) => {
return await ctx.db.get(id);
},
});
export const list = query({
args: {},
handler: async (ctx) => {
return await ctx.db.query("tasks").collect();
},
});Examples from the Biome documentation.
ESLint does not have this rule.
Oxlint does not have this rule.
nursery/useConvexArgsValidator
nursery · since 2.6.10
{
"linter": {
"rules": {
"nursery": {
"useConvexArgsValidator": "error"
}
}
}
}Require public Convex functions to call an access control function.
Require the table name as the first argument of Convex database calls.
Enforce JSON keys with consistent Unicode representation.
Require a reason when using the @deprecated directive.
Require kind sets in Biome JS plugins to be created at the top level of the module.
Require a generic fallback in font-family lists.