<commit_before>import Joi from 'joi'
import moduleSchema from './properties/module'

const schema = Joi.object({
  amd: Joi.any(),
  bail: Joi.any(),
  cache: Joi.any(),
  context: Joi.any(),
  debug: Joi.any(),
  devServer: Joi.any(),
  devtool: Joi.any(),
  entry: Joi.any(),
  externals: Joi.any(),
  loader: Joi.any(),
  module: moduleSchema,
  node: Joi.any(),
  output: Joi.any(),
  plugins: Joi.any(),
  profile: Joi.any(),
  recordsInputPath: Joi.any(),
  recordsOutputPath: Joi.any(),
  recordsPath: Joi.any(),
  resolve: Joi.any(),
  resolveLoader: Joi.any(),
  stats: Joi.any(),
  target: Joi.any(),

  // Plugins
  postcss: Joi.any(),
  eslint: Joi.any(),
  tslint: Joi.any(),
  metadata: Joi.any(),
})//.unknown()

// Easier consumability for require (default use case for non-transpiled webpack configs)
module.exports.schema = schema

module.exports = function validate(config, schema_ = schema) {
  Joi.assert(config, schema_)
}<commit_msg>fix(lib): module exports order<commit_after>import Joi from 'joi'
import moduleSchema from './properties/module'

const schema = Joi.object({
  amd: Joi.any(),
  bail: Joi.any(),
  cache: Joi.any(),
  context: Joi.any(),
  debug: Joi.any(),
  devServer: Joi.any(),
  devtool: Joi.any(),
  entry: Joi.any(),
  externals: Joi.any(),
  loader: Joi.any(),
  module: moduleSchema,
  node: Joi.any(),
  output: Joi.any(),
  plugins: Joi.any(),
  profile: Joi.any(),
  recordsInputPath: Joi.any(),
  recordsOutputPath: Joi.any(),
  recordsPath: Joi.any(),
  resolve: Joi.any(),
  resolveLoader: Joi.any(),
  stats: Joi.any(),
  target: Joi.any(),

  // Plugins
  postcss: Joi.any(),
  eslint: Joi.any(),
  tslint: Joi.any(),
  metadata: Joi.any(),
})//.unknown()

// Easier consumability for require (default use case for non-transpiled webpack configs)
module.exports = function validate(config, schema_ = schema) {
  Joi.assert(config, schema_)
}
module.exports.schema = schema
{'fraction_non_alphanumeric': 0.1779045643153527, 'fraction_numerical': 0.0, 'mean_word_length': 3.9588688946015425, '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': '2300465', 'n_tokens_mistral': 720, 'n_tokens_neox': 714, 'n_words': 173}