<commit_before>/**
 * @copyright   2017-2018, <NAME>
 * @license     https://opensource.org/licenses/MIT
 */

/* eslint-disable no-cond-assign */

import chalk from 'chalk';
import fs from 'fs';
import glob from 'fast-glob';
import path from 'path';
import JSON5 from 'json5';
import camelCase from 'lodash/camelCase';
import mergeWith from 'lodash/mergeWith';
import { Arguments } from 'yargs-parser';
import optimal, { array, bool, instance, number, object, shape, string, union } from 'optimal';
import formatModuleName from './helpers/formatModuleName';
import handleMerge from './helpers/handleMerge';
import isObject from './helpers/isObject';
import isEmptyObject from './helpers/isEmptyObject';
import requireModule from './helpers/requireModule';
import Tool from './Tool';
import { MODULE_NAME_PATTERN, PLUGIN_NAME_PATTERN } from './constants';
import { Debugger, PackageConfig } from './types';

export type ConfigObject = { [key: string]: any };

export type ConfigPathOrObject = string | ConfigObject;

export interface ParseOptions {
  errorOnFunction?: boolean;
}

export default class ConfigLoader {
  debug: Debugger;

  package: PackageConfig = { name: '' };

  parsedFiles: { [path: string]: boolean } = {};
<commit_msg>Fix eslint warning.<commit_after>/**
 * @copyright   2017-2018, <NAME>
 * @license     https://opensource.org/licenses/MIT
 */

/* eslint-disable no-cond-assign */

import chalk from 'chalk';
import fs from 'fs';
import glob from 'fast-glob';
import path from 'path';
import JSON5 from 'json5';
import camelCase from 'lodash/camelCase';
import mergeWith from 'lodash/mergeWith';
import { Arguments } from 'yargs-parser';
import optimal, { array, bool, instance, number, shape, string, union } from 'optimal';
import formatModuleName from './helpers/formatModuleName';
import handleMerge from './helpers/handleMerge';
import isObject from './helpers/isObject';
import isEmptyObject from './helpers/isEmptyObject';
import requireModule from './helpers/requireModule';
import Tool from './Tool';
import { MODULE_NAME_PATTERN, PLUGIN_NAME_PATTERN } from './constants';
import { Debugger, PackageConfig } from './types';

export type ConfigObject = { [key: string]: any };

export type ConfigPathOrObject = string | ConfigObject;

export interface ParseOptions {
  errorOnFunction?: boolean;
}

export default class ConfigLoader {
  debug: Debugger;

  package: PackageConfig = { name: '' };

  parsedFiles: { [path: string]: boolean } = {};

{'fraction_non_alphanumeric': 0.13004846526655897, 'fraction_numerical': 0.008077544426494346, 'mean_word_length': 4.940047961630696, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, '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': '344057', 'n_tokens_mistral': 722, 'n_tokens_neox': 707, 'n_words': 231}