Skip to content
This repository has been archived by the owner on Aug 18, 2021. It is now read-only.

Commit

Permalink
Remove unnecessary temp variable
Browse files Browse the repository at this point in the history
  • Loading branch information
kaicataldo committed Jan 17, 2019
1 parent ce4e768 commit 0ce8429
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/parse.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const {
} = require("@babel/core");

module.exports = function(code, options) {
const opts = {
let opts = {
sourceType: options.sourceType,
filename: options.filePath,
cwd: options.babelOptions.cwd,
Expand Down Expand Up @@ -39,7 +39,6 @@ module.exports = function(code, options) {
name: "babel-eslint",
},
};
let parseOpts = opts;
let config;

if (options.requireConfigFile !== false) {
Expand All @@ -54,14 +53,14 @@ module.exports = function(code, options) {
);
}

parseOpts = config.options;
opts = config.options;
}
}

let ast;

try {
ast = parse(code, parseOpts);
ast = parse(code, opts);
} catch (err) {
if (err instanceof SyntaxError) {
err.lineNumber = err.loc.line;
Expand Down

0 comments on commit 0ce8429

Please sign in to comment.