function checkConfigFile () {
	const configFileName = getConfigFile();

	// Check if file is present
	if (fs.existsSync(configFileName) === false) {
		throw new Error(`File not found: ${configFileName}\nNo config file present!`);
	}

	// Check permission
	try {
		fs.accessSync(configFileName, fs.F_OK);
	} catch (error) {
		throw new Error(`${error}\nNo permission to access config file!`);
	}

	// Validate syntax of the configuration file.
	Log.info(`Checking config file ${configFileName} ...`);

	// I'm not sure if all ever is utf-8
	const configFile = fs.readFileSync(configFileName, "utf-8");

	const errors = linter.verify(
		configFile,
		{
			languageOptions: {
				ecmaVersion: "latest",
				globals: {
					...globals.node
				}
			}
		},
		configFileName
	);

	if (errors.length === 0) {
		Log.info(colors.green("Your configuration file doesn't contain syntax errors :)"));
		validateModulePositions(configFileName);
	} else {
		let errorMessage = "Your configuration file contains syntax errors :(";

		for (const error of errors) {
			errorMessage += `\nLine ${error.line} column ${error.column}: ${error.message}`;
		}
		throw new Error(errorMessage);
	}
}
Checks the config file using eslint.