How to use the jest-validate/build/warnings.unknownOptionWarning function in jest-validate

To help you get started, we’ve selected a few jest-validate examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github okonet / lint-staged / src / config-util / validateConfig.js View on Github external
)} was found in the config root.

  You are probably trying to mix simple and advanced config formats. Adding

  ${chalk.bold(`"linters": {
    "${option}": ${JSON.stringify(config[option])}
  }`)}

  will fix it and remove this message.`

    const comment = options.comment
    const name = (options.title && options.title.warning) || 'WARNING'
    return logValidationWarning(name, message, comment)
  }
  // If it is not glob pattern, use default jest-validate reporter
  return unknownOptionWarning(config, example, option, options)
}

jest-validate

Generic configuration validation tool that helps you with warnings, errors and deprecation messages as well as showing users examples of correct configuration.

MIT
Latest version published 10 months ago

Package Health Score

91 / 100
Full package analysis

Similar packages