Skip to content

Instantly share code, notes, and snippets.

@cartant
Created December 5, 2020 12:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cartant/02d681e26fbd3c6e3a4e44bf514494c4 to your computer and use it in GitHub Desktop.
Save cartant/02d681e26fbd3c6e3a4e44bf514494c4 to your computer and use it in GitHub Desktop.
const baseRule = require("./no-foreach");
module.exports = {
meta: {
/* ... */
},
create(context) {
const contextForBaseRule = Object.create(context);
contextForBaseRule.options = [{ types: ["Array"] }];
return baseRule.create(contextForBaseRule);
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment