initial
Release / release (push) Failing after 9s

This commit is contained in:
2026-09-09 09:56:21 +02:00
commit 04e80929f0
37 changed files with 3463 additions and 0 deletions
@@ -0,0 +1,28 @@
import { defineRule } from "@oxlint/plugins";
import { isGlobalReflectMethodCall } from "../shared/reflect-method.ts";
/** Ban Reflect.apply, which bypasses ordinary typed function calls. */
export const noReflectApplyRule = defineRule({
meta: {
type: "problem",
docs: {
description:
"Disallow Reflect.apply; call typed functions directly or model dynamic dispatch behind an interface.",
},
messages: {
reflectApply:
"Replace `Reflect.apply` with a typed function call. Model dynamic dispatch behind a named interface.",
},
},
createOnce(context) {
return {
CallExpression(node) {
if (node.callee.type === "Super" || node.callee.type === "V8IntrinsicExpression") return;
if (isGlobalReflectMethodCall(context.sourceCode, node.callee, "apply")) {
context.report({ node, messageId: "reflectApply" });
}
},
};
},
});