svgo
svgo copied to clipboard
fix(removeAttributesBySelector): update for v2 API, better docs, add parameter types
This is a general cleanup PR for the removeAttributesBySelector plugin. It was never updated for the v2 API, and its doc page was not very clear on how to use it; this PR addresses both.
Changes
- Plugin was updated to use the V2 API
- Added a check to avoid runtime errors when plugin is not configured, or misconfigured
- Added a test to ensure plugin is a no-op when not configured
- Expanded and clarified the plugin's doc page
- Added TypeScript parameter types