lib/utils/rules.js
function collectRules(category) {
    return rules.reduce((obj, rule) => {
        if (!category || rule.meta.docs.category === category) {
            obj[rule.meta.docs.ruleId] = "error"
        }
        return obj
    }, {})
}
function collectRules(category) {
    return rules.reduce((obj, rule) => {
        if (!category || rule.meta.docs.category === category) {
            obj[rule.meta.docs.ruleId] = "error"
        }
        return obj
    }, {})
}
function collectRules ( category ) { return rules . reduce ( ( obj , rule ) => { if ( ! category || rule . meta . docs . category === category ) { obj [ rule . meta . docs . ruleId ] = "error" } return obj } , { } ) }
Collect the rules
@param {string} category category
@returns {Array} rules
Collect the rules