1000ch / vscode-svgo

Fully featured SVGO extension for Visual Studio Code 🐯
https://marketplace.visualstudio.com/items?itemName=1000ch.svgo
MIT License
72 stars 8 forks source link

Version 2.0.1 is not disabling default plugins #33

Closed imrahil closed 3 years ago

imrahil commented 3 years ago

Changes in commit https://github.com/1000ch/vscode-svgo/commit/0bad94ded36deb7be73e1d779e276d84b4212a81 simply ignore settings from VS Code that are "false" so it's not possible to disable any plugins...

Please use new configuration schema with "active" field:

{
   name: 'builtinPluginName',
   active: false
}

so no filter but map when using extendDefaultPlugins:

const plugins = extendDefaultPlugins(defaultPlugins.map(plugin => {
  return {
      name: plugin,
      active: svgoConfig.get<boolean>(plugin as string)
    }
}));
1000ch commented 3 years ago

Fixed on 33de71e.