src/editorconfig.js
function getStyleForFile(filepath) {
	const editorconfigFile = findEditorConfig(filepath);
	if (editorconfigFile) {
		return editorconfig.parseFromFilesSync(filepath, [
			{ name: editorconfigFile, contents: readFile(editorconfigFile) },
		]);
	}

	return {};
}
function getStyleForFile(filepath) {
	const editorconfigFile = findEditorConfig(filepath);
	if (editorconfigFile) {
		return editorconfig.parseFromFilesSync(filepath, [
			{ name: editorconfigFile, contents: readFile(editorconfigFile) },
		]);
	}

	return {};
}
function getStyleForFile ( filepath ) { const editorconfigFile = findEditorConfig ( filepath ) ; if ( editorconfigFile ) { return editorconfig . parseFromFilesSync ( filepath , [ { name : editorconfigFile , contents : readFile ( editorconfigFile ) } , ] ) ; } return { } ; }
Read EditorConfig for a given file.

@param {string} filepath
@return {EditorConfigStyle}
Read EditorConfig for a given file .