linter.js
function transformConfig (config) {
	if (config === null || typeof config !== 'object') {
		config = {};
	}

	if (!Object.keys(config).length) {
		return {
			options: {},
			files: {
				ignore: [ignoreNodeModules()]
			}
		};
	}

	let runConfig = {
		options: {
			showMaxStack: 0
		}
	};

	if (config.noDisabling) {
		runConfig.options.noDisabling = true;
	}

	if (config.formatter) {
		runConfig.options.formatter = config.formatter;
	}
	if (config.showMaxStack >= 0) {
		runConfig.options.showMaxStack = config.showMaxStack;
	}
	if (config.outputFile) {
		runConfig.options['output-file'] = config.outputFile;
	}
	if (Array.isArray(config.ignore)) {
		runConfig.files = {
			ignore: config.ignore.concat(ignoreNodeModules())
		};
	} else {
		runConfig.files = {
			ignore: [ignoreNodeModules()]
		};
	}

	return runConfig;
}
function transformConfig (config) {
	if (config === null || typeof config !== 'object') {
		config = {};
	}

	if (!Object.keys(config).length) {
		return {
			options: {},
			files: {
				ignore: [ignoreNodeModules()]
			}
		};
	}

	let runConfig = {
		options: {
			showMaxStack: 0
		}
	};

	if (config.noDisabling) {
		runConfig.options.noDisabling = true;
	}

	if (config.formatter) {
		runConfig.options.formatter = config.formatter;
	}
	if (config.showMaxStack >= 0) {
		runConfig.options.showMaxStack = config.showMaxStack;
	}
	if (config.outputFile) {
		runConfig.options['output-file'] = config.outputFile;
	}
	if (Array.isArray(config.ignore)) {
		runConfig.files = {
			ignore: config.ignore.concat(ignoreNodeModules())
		};
	} else {
		runConfig.files = {
			ignore: [ignoreNodeModules()]
		};
	}

	return runConfig;
}
function transformConfig ( config ) { if ( config === null || typeof config !== 'object' ) { config = { } ; } if ( ! Object . keys ( config ) . length ) { return { options : { } , files : { ignore : [ ignoreNodeModules ( ) ] } } ; } let runConfig = { options : { showMaxStack : 0 } } ; if ( config . noDisabling ) { runConfig . options . noDisabling = true ; } if ( config . formatter ) { runConfig . options . formatter = config . formatter ; } if ( config . showMaxStack >= 0 ) { runConfig . options . showMaxStack = config . showMaxStack ; } if ( config . outputFile ) { runConfig . options [ 'output-file' ] = config . outputFile ; } if ( Array . isArray ( config . ignore ) ) { runConfig . files = { ignore : config . ignore . concat ( ignoreNodeModules ( ) ) } ; } else { runConfig . files = { ignore : [ ignoreNodeModules ( ) ] } ; } return runConfig ; }
Transform user config for linter config
@private
@param {Object} [config]
@returns {Object}
Transform user config for linter config