function cleanListOfRules(d, path) {
  return d
    .map(function (d, i) {
      return cleanRule(d, path + '[' + i + ']')
    })
    .filter(function (d) {
      return Object.keys(d).length > 0
    })
}
@param {ReadonlyArray<Rule>} d
  List of rules to clean.
@param {string} path
  Path.
@returns {Array<Rule>}
  Cleaned list of rules.