check-rule-repeat.js 327 B

123456789101112131415
  1. module.exports = checkRule
  2. function checkRule(context) {
  3. var repetition = context.options.ruleRepetition || 3
  4. if (repetition < 3) {
  5. throw new Error(
  6. 'Cannot serialize rules with repetition `' +
  7. repetition +
  8. '` for `options.ruleRepetition`, expected `3` or more'
  9. )
  10. }
  11. return repetition
  12. }