mergeAll(configs) {
        const options = configs.reduce((prev, current) => {
            const presets = [...(prev.presets || []), ...(current.presets || [])].map(
                preset => babel.createConfigItem(preset, { type: 'preset' })
            );

            const plugins = [...(prev.plugins || []), ...(current.plugins || [])].map(
                preset => babel.createConfigItem(preset, { type: 'plugin' })
            );

            return Object.assign(prev, current, { presets, plugins });
        });

        // @ts-ignore TODO: fix type
        options.plugins = this.filterConfigItems(options.plugins || []);

        // @ts-ignore TODO: fix type
        options.presets = this.filterConfigItems(options.presets || []);

        return options;
    }
Merge babel configs

@param {BabelOptions[]} configs