Skip to content

Commit

Permalink
Add a warning about plugin configuration error
Browse files Browse the repository at this point in the history
Usual error by not proper YML syntax like #1115
  • Loading branch information
GreLI committed Jul 13, 2019
1 parent ac34386 commit 27cdeb7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/svgo/config.js
Expand Up @@ -124,6 +124,10 @@ function extendConfig(defaults, config) {

key = Object.keys(item)[0];

if (item[key] == null) {
console.error(`Error: '${key}' plugin is misconfigured! Have you padded its content in YML properly?\n`);
}

// custom
if (typeof item[key] === 'object' && item[key].fn && typeof item[key].fn === 'function') {
defaults.plugins.push(setupCustomPlugin(key, item[key]));
Expand Down

0 comments on commit 27cdeb7

Please sign in to comment.