<commit_before>var fs = require('fs');

var defaultSettings = {
  music: {
    bpm: 110,
    subdivision: 6
  }
};

function load(projectPath) {
  var rawProjectSettings = fs.readFileSync(projectPath + '/nin.json', 'utf8');
  var projectSettings = JSON.parse(rawProjectSettings);
  return traverse(projectSettings, defaultSettings);
}

function write(projectPath, parsedProjectSettings) {
  var projectSettingsFile = "var PROJECT = " + JSON.stringify(parsedProjectSettings) + ";";
  fs.writeFileSync(
    projectPath + '/gen/projectSettings.js',
    new Buffer(projectSettingsFile)
  );
}

function generate(projectPath) {
  write(projectPath, load(projectPath));
}

function traverse(input, defaults) {
  var output = {};
  for (var key in defaults) {
    if (key in input) {
      if (typeof input[key] === 'object') {
        output[key] = traverse(input[key], defaults[key]);
      } else {<commit_msg>Fix lint errors in projectSettings<commit_after>var fs = require('fs');

var defaultSettings = {
  music: {
    bpm: 110,
    subdivision: 6
  }
};

function load(projectPath) {
  var rawProjectSettings = fs.readFileSync(projectPath + '/nin.json', 'utf8');
  var projectSettings = JSON.parse(rawProjectSettings);
  return traverse(projectSettings, defaultSettings);
}

function write(projectPath, parsedProjectSettings) {
  var projectSettingsFile = 'var PROJECT = ' + JSON.stringify(parsedProjectSettings) + ';';
  fs.writeFileSync(
    projectPath + '/gen/projectSettings.js',
    new Buffer(projectSettingsFile)
  );
}

function generate(projectPath) {
  write(projectPath, load(projectPath));
}

function traverse(input, defaults) {
  var output = {};
  for (var key in defaults) {
    if (key in input) {
      if (typeof input[key] === 'object') {
        output[key] = traverse(input[key], defaults[key]);
      } else {
{'fraction_non_alphanumeric': 0.1342062193126023, 'fraction_numerical': 0.005455537370430988, 'mean_word_length': 4.315942028985507, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6621364', 'n_tokens_mistral': 572, 'n_tokens_neox': 557, 'n_words': 128}