Fixes an issue that would've existed since the project was using SVGO v2.0.0. The preset-defaultoverride parameter is only used to disable plugins that are a part of preset-default, but it can not enable plugins that aren't.
This puts plugins that are not in preset-default as new items in the plugin array instead of in the override parameter. Now they actually get invoked.
Chores
I've also done some chores, feel free to ask me to revert any of them or ask for clarification if needed:
In package.json, the engines.vscode reflects the minimum version of VSC your extension supports. By increasing it, you stop people from being able to install or use this add-on who are on older versions. Ideally, you want this as low as possible, only increasing it when you actually use a new feature only available in higher versions.
Even I'm still on version 1.89 atm, so I actually had to lower it to make this contribution. You can probably lower it down to ^1.14.0, or even lower, but I figured just reverting it to the previous commit is safest for now.
I disabled @typescript-eslint/prefer-nullish-coalescing which allows CI to pass again. I intentionally opted for this instead of applying the fix, because it wanted to make the code overly defensive and put null checks in place where the property obviously couldn't be null.
I also moved @typescript-eslint/no-empty-function into your package.json.
engines.vscode: This specifies the minimum version of VS Code API that the extension depends on.
Fixes an issue that would've existed since the project was using SVGO v2.0.0. The
preset-default
override
parameter is only used to disable plugins that are a part ofpreset-default
, but it can not enable plugins that aren't.This puts plugins that are not in
preset-default
as new items in the plugin array instead of in theoverride
parameter. Now they actually get invoked.Chores
I've also done some chores, feel free to ask me to revert any of them or ask for clarification if needed:
package.json
, theengines.vscode
reflects the minimum version of VSC your extension supports. By increasing it, you stop people from being able to install or use this add-on who are on older versions. Ideally, you want this as low as possible, only increasing it when you actually use a new feature only available in higher versions.^1.14.0
, or even lower, but I figured just reverting it to the previous commit is safest for now.@typescript-eslint/prefer-nullish-coalescing
which allows CI to pass again. I intentionally opted for this instead of applying the fix, because it wanted to make the code overly defensive and put null checks in place where the property obviously couldn't be null.@typescript-eslint/no-empty-function
into yourpackage.json
.Screenshots
Before
Observe that despite having removeXMLNS enabled, the XML namespace declaration is still there.
After
Observe that the XML namespace declaration is now gone.