<commit_before>'use strict';

var fs = require('fs');
var path = require('path');
var stripJSONComments = require('strip-json-comments');

var logger;

exports.defaults = function () {
  return {
    jscs: {
      exclude: [],
      compiled: true,
      copied: true,
      vendor: false,
      rules: { },
    }
  };
};

exports.placeholder = function () {
  // TODO: Document
  return '';
};

exports.validate = function (config, validators) {
  logger = config.log;

  var errors = [];

  if (validators.ifExistsIsObject(errors, 'jscs config', config.jscs)) {
    // Note: Call below will modify config to have an
    // jscs.excludeRegex and change jscs.exclude to have absolute
    // paths
    validators.ifExistsFileExcludeWithRegexAndString(errors,
                                                     'jscs.exclude',
                                                     config.jscs,
                                                     config.watch.sourceDir);<commit_msg>Add placeholder text<commit_after>'use strict';

var fs = require('fs');
var path = require('path');
var stripJSONComments = require('strip-json-comments');

var logger;

exports.defaults = function () {
  return {
    jscs: {
      exclude: [],
      compiled: true,
      copied: true,
      vendor: false,
      rules: { },
    }
  };
};

exports.placeholder = function () {
  // Text below based on jshint's placeholder text by dbashford
  return '\n' +
    'jscs:                     # Settings for javascript JSCS linting, more\n' +
    '                          # ' +
    'detailed documentation can be found at the project\n' +
    '                          # homepage at\n' +
    '                          # https://github.com/al-broco/mimosa-jscs\n' +
    '  exclude: []             # ' +
    'Array of strings or regexes that match files to not\n' +
    '                          # ' +
    'lint, strings are paths that can be relative to the\n' +
    '                          # watch.sourceDir or absolute\n' +
    '  compiled: true          # ' +
    'Fire jscs on successful compile of meta-language to\n' +
    '                          # javascript\n' +
    '  copied: true            # Fire jscs for copied javascript files\n' +
    '  vendor: false           # ' +
    'Fire jscs for copied vendor javascript files\n' +
    '  # configFile: \'.jscsrc\' # ' +
    'This is the path, either relative to the root of the\n' +
    '                          # ' +
    'project or absolute, to a JSCS configuration file.\n' +
    '                          # ' +
    'If the file extension is .js or .json the file will\n' +
    '                          # ' +
    'be read using Node\'s require. Otherwise the file\n' +
    '                          # ' +
    'will be read as commented JSON. If the file name is\n' +
    '                          # ' +
    'package.json, the JSCS configuration is expected to\n' +
    '                          # be found in a property jscsConfig.\n' +
    '  rules: { }              # ' +
    'Configuration: https://www.npmjs.org/package/jscs,\n' +
    '                          # ' +
    'these settings will override any settings set up in\n' +
    '                          # the configuration file.\n';
};

exports.validate = function (config, validators) {
  logger = config.log;

  var errors = [];

  if (validators.ifExistsIsObject(errors, 'jscs config', config.jscs)) {
    // Note: Call below will modify config to have an
    // jscs.excludeRegex and change jscs.exclude to have absolute
    // paths
    validators.ifExistsFileExcludeWithRegexAndString(errors,
                                                     'jscs.exclude',
                                                     config.jscs,
                                                     config.watch.sourceDir);
{'fraction_non_alphanumeric': 0.11018276762402089, 'fraction_numerical': 0.0, 'mean_word_length': 1.447923322683706, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4066083', 'n_tokens_mistral': 1062, 'n_tokens_neox': 1039, 'n_words': 286}