babel/eslint/babel-eslint-parser/src/configuration.cjs
2021-05-17 17:04:10 +02:00

21 lines
476 B
JavaScript

exports.normalizeESLintConfig = function (options) {
const {
babelOptions = {},
// ESLint sets ecmaVersion: undefined when ecmaVersion is not set in the config.
ecmaVersion = 2020,
sourceType = "module",
allowImportExportEverywhere = false,
requireConfigFile = true,
...otherOptions
} = options;
return {
babelOptions,
ecmaVersion,
sourceType,
allowImportExportEverywhere,
requireConfigFile,
...otherOptions,
};
};