configuration.cjs 926 B

123456789101112131415161718192021222324
  1. const _excluded = ["babelOptions", "ecmaVersion", "sourceType", "requireConfigFile"];
  2. function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
  3. exports.normalizeESLintConfig = function (options) {
  4. const {
  5. babelOptions = {},
  6. ecmaVersion = 2020,
  7. sourceType = "module",
  8. requireConfigFile = true
  9. } = options,
  10. otherOptions = _objectWithoutPropertiesLoose(options, _excluded);
  11. return Object.assign({
  12. babelOptions: Object.assign({
  13. cwd: process.cwd()
  14. }, babelOptions),
  15. ecmaVersion: ecmaVersion === "latest" ? 1e8 : ecmaVersion,
  16. sourceType,
  17. requireConfigFile
  18. }, otherOptions);
  19. };
  20. //# sourceMappingURL=configuration.cjs.map