function inferStyle(source) {
	const style = {
		insert_final_newline: hasTrailingNewLine(source),
	};

	const indent = detectIndent(source);
	if (indent.type) {
		style.indent_style = indent.type;
		style.indent_size = indent.type === 'tab' ? 'tab' : indent.amount;
	}

	return style;
}
Infer most common EditorConfig options from source code.

Supports: indent_style, indent_size, insert_final_newline

@param {string} source
@return {EditorConfigStyle}