code: function getSeverity(config, ruleId) {
      const rules = config && config.rules
      const ruleOptions = rules && rules[ruleId]
      const severity = Array.isArray(ruleOptions) ? ruleOptions[0] : ruleOptions
  
      switch (severity) {
          case 2:
          case "error":
              return 2
  
          case 1:
          case "warn":
              return 1
  
          default:
              return 0
      }
  }
docs: Get the severity of a given rule.
  @param {object} config The config object to check.
  @param {string} ruleId The rule ID to check.
  @returns {number} The severity of the rule.