Skip to content

Commit

Permalink
fix flow errors
Browse files Browse the repository at this point in the history
  • Loading branch information
JLHwung committed Jan 10, 2020
1 parent 7ee711d commit 28c83d0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/babel-core/src/config/validation/options.js
Expand Up @@ -376,6 +376,7 @@ function throwUnknownError(loc: OptionPath) {
loc,
)}. Check out https://babeljs.io/docs/en/babel-core/#options for more information about options.`,
);
// $FlowIgnore
unknownOptErr.code = "BABEL_UNKNOWN_OPTION";

throw unknownOptErr;
Expand Down
1 change: 1 addition & 0 deletions packages/babel-core/src/config/validation/plugins.js
Expand Up @@ -101,6 +101,7 @@ export function validatePluginObject(obj: {}): PluginObject {
const invalidPluginPropertyError = new Error(
`.${key} is not a valid Plugin property`,
);
// $FlowIgnore
invalidPluginPropertyError.code = "BABEL_UNKNOWN_PLUGIN_PROPERTY";
throw invalidPluginPropertyError;
}
Expand Down

0 comments on commit 28c83d0

Please sign in to comment.