Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
const baseRule = require("./no-foreach");
module.exports = {
meta: {
/* ... */
},
create(context) {
const contextForBaseRule = new Proxy(context, {
get(target, property, receiver) {
if (property === "options") {
return [{ types: ["Array"] }];
}
return Reflect.get(target, property, receiver);
}
});
return baseRule.create(contextForBaseRule);
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment