| 2 | import { RootRaws } from '../lib/root.js' |
| 3 | |
| 4 | const plugin: PluginCreator<string> = prop => { |
| 5 | return { |
| 6 | Declaration: (decl, { Comment, result }) => { |
| 7 | if (decl.prop === prop) { |
| 8 | decl.warn(result, `${decl.prop} found in ${decl.parent?.nodes.length}`) |
| 9 | decl.replaceWith(new Comment({ text: `${decl.prop} removed` })) |
| 10 | } |
| 11 | }, |
| 12 | postcssPlugin: 'remover' |
| 13 | } |
| 14 | } |
| 15 | |
| 16 | plugin.postcss = true |
| 17 |
no test coverage detected
searching dependent graphs…