(node, item, list, options)
| 77 | } |
| 78 | |
| 79 | export default function cleanRule(node, item, list, options) { |
| 80 | if (hasNoChildren(node.prelude) || hasNoChildren(node.block)) { |
| 81 | list.remove(item); |
| 82 | return; |
| 83 | } |
| 84 | |
| 85 | // avoid usage filtering for some at-rules |
| 86 | if (this.atrule && skipUsageFilteringAtrule.has(keyword(this.atrule.name).basename)) { |
| 87 | return; |
| 88 | } |
| 89 | |
| 90 | const { usage } = options; |
| 91 | |
| 92 | if (usage && (usage.whitelist !== null || usage.blacklist !== null)) { |
| 93 | cleanUnused(node.prelude, usage); |
| 94 | |
| 95 | if (hasNoChildren(node.prelude)) { |
| 96 | list.remove(item); |
| 97 | return; |
| 98 | } |
| 99 | } |
| 100 | }; |
nothing calls this directly
no test coverage detected
searching dependent graphs…