Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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;
}