function getRule(slots, ruleId) {
	return (
		(slots.lastConfigArray &&
			slots.lastConfigArray.pluginRules.get(ruleId)) ||
		slots.ruleMap.get(ruleId)
	);
}
Get a rule.
@param {LinterInternalSlots} slots The internal slots of Linter.
@param {string} ruleId The rule ID to get.
@returns {Rule|null} The rule.