docs/.vuepress/components/state/serialize.js
function getEnabledRules(allRules) {
    return Object.keys(allRules).reduce((map, id) => {
        if (allRules[id] === "error") {
            map[id] = 2
        }
        return map
    }, {})
}
function getEnabledRules(allRules) {
    return Object.keys(allRules).reduce((map, id) => {
        if (allRules[id] === "error") {
            map[id] = 2
        }
        return map
    }, {})
}
function getEnabledRules ( allRules ) { return Object . keys ( allRules ) . reduce ( ( map , id ) => { if ( allRules [ id ] === "error" ) { map [ id ] = 2 } return map } , { } ) }
Get only enabled rules to make the serialized data smaller.
@param {object} allRules The rule settings.
@returns {object} The rule settings for the enabled rules.
Get only enabled rules to make the serialized data smaller .