Rules
Every rule from ESLint, Oxlint and Biome. Pick a rule to see its example. Reach is the weekly npm downloads of the presets that enable a rule; trend is its change over the last quarter.
Every rule from ESLint, Oxlint and Biome. Pick a rule to see its example. Reach is the weekly npm downloads of the presets that enable a rule; trend is its change over the last quarter.
No rules match “”.
Popular · 1 of 50
Require public Convex functions to call an access control function.
import { mutation } from "./_generated/server";
export const send = mutation({
args: {},
handler: async (ctx) => {
await ctx.db.insert("messages", { body: "hello" });
},
});import { internalMutation, mutation, query } from "./_generated/server";
export const list = query({
args: {},
handler: async (ctx) => {
const user = await requireUser(ctx);
},
});
export const update = mutation({
args: {},
handler: async (ctx) => {
if (!(await canEditNote(ctx))) {
throw new Error("Unauthorized");
}
},
});
export const remove = mutation({
args: {},
handler: async (ctx) => {
await authz.require(ctx, "documents:delete");
},
});
export const cleanup = internalMutation({
args: {},
handler: async (ctx) => {
await ctx.db.delete("messages", messageId);
},
});