configuration.cjs 842 B

1234567891011121314151617181920212223
  1. "use strict";
  2. const _excluded = ["babelOptions", "ecmaVersion", "sourceType", "requireConfigFile"];
  3. function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
  4. module.exports = function normalizeESLintConfig(options) {
  5. const {
  6. babelOptions = {},
  7. ecmaVersion = 2020,
  8. sourceType = "module",
  9. requireConfigFile = true
  10. } = options,
  11. otherOptions = _objectWithoutPropertiesLoose(options, _excluded);
  12. return Object.assign({
  13. babelOptions: Object.assign({
  14. cwd: process.cwd()
  15. }, babelOptions),
  16. ecmaVersion: ecmaVersion === "latest" ? 1e8 : ecmaVersion,
  17. sourceType,
  18. requireConfigFile
  19. }, otherOptions);
  20. };
  21. //# sourceMappingURL=configuration.cjs.map