How to use the editorconfig/lib/ini.parseSync function in editorconfig

To help you get started, we’ve selected a few editorconfig examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github lesnitsky / editorconfig-cli / lib / ECFile.js View on Github external
ECFile.readSync = function (folder) {
	var sections = ecparser.parseSync(path.join(folder, '.editorconfig'));
	var config = {
		root: false,
		sections: []
	};

	sections.forEach(function (section) {
		var sectionName = section[0];
		var rules = section[1];

		if (!sectionName) {
			if (rules.root) {
				config.root = true;
			}
			return;
		}

editorconfig

EditorConfig File Locator and Interpreter for Node.js

MIT
Latest version published 10 months ago

Package Health Score

77 / 100
Full package analysis