| 1 | exports.normalizeESLintConfig = function (options) { |
| 2 | const { |
| 3 | babelOptions = {}, |
| 4 | // ESLint sets ecmaVersion: undefined when ecmaVersion is not set in the config. |
| 5 | ecmaVersion = 2020, |
| 6 | sourceType = "module", |
| 7 | requireConfigFile = true, |
| 8 | ...otherOptions |
| 9 | } = options; |
| 10 | |
| 11 | return { |
| 12 | babelOptions: { cwd: process.cwd(), ...babelOptions }, |
| 13 | ecmaVersion: ecmaVersion === "latest" ? 1e8 : ecmaVersion, |
| 14 | sourceType, |
| 15 | requireConfigFile, |
| 16 | ...otherOptions, |
| 17 | }; |
| 18 | }; |