configuration.cjs 950 B

1234567891011121314151617181920212223
  1. "use strict";
  2. const _excluded = ["babelOptions", "ecmaVersion", "sourceType", "requireConfigFile"];
  3. 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; }
  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