Skip to content

Commit

Permalink
chore: throw Error instead of builtin ReferenceError
Browse files Browse the repository at this point in the history
  • Loading branch information
JLHwung committed Jan 9, 2020
1 parent 798043c commit 0986538
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/babel-core/src/config/validation/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -366,12 +366,12 @@ function throwUnknownError(loc: OptionPath) {
if (removed[key]) {
const { message, version = 5 } = removed[key];

throw new ReferenceError(
throw new Error(
`Using removed Babel ${version} option: ${msg(loc)} - ${message}`,
);
} else {
// eslint-disable-next-line max-len
const unknownOptErr = new ReferenceError(
const unknownOptErr = new Error(
`Unknown option: ${msg(
loc,
)}. Check out https://babeljs.io/docs/en/babel-core/#options for more information about options.`,
Expand Down

0 comments on commit 0986538

Please sign in to comment.