Skip to content

Commit

Permalink
Address feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
kaicataldo committed May 29, 2020
1 parent 182a26e commit 8e3f0dd
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions eslint/babel-eslint-parser/src/configuration.js
Expand Up @@ -6,6 +6,7 @@ export function normalizeESLintConfig(options) {
ecmaVersion: 2020,
sourceType: "module",
allowImportExportEverywhere: false,
requireConfigFile: true,
};

return Object.assign(defaultOptions, options);
Expand All @@ -15,18 +16,20 @@ export function normalizeBabelParseConfig(options) {
const parseOptions = {
sourceType: options.sourceType,
filename: options.filePath,
...options.babelOptions,
parserOpts: {
allowImportExportEverywhere: options.allowImportExportEverywhere,
allowReturnOutsideFunction: true,
allowSuperOutsideMethod: true,
...options.babelOptions.parserOpts,
plugins: ["estree", ...(options.babelOptions.parserOpts?.plugins ?? [])],
ranges: true,
tokens: true,
plugins: ["estree"],
},
caller: {
name: "@babel/eslint-parser",
...options.babelOptions.caller,
},
...options.babelOptions,
};

if (options.requireConfigFile !== false) {
Expand Down

0 comments on commit 8e3f0dd

Please sign in to comment.