Skip to content

Commit

Permalink
[parser] Make decoratorsBeforeExport default to false
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolo-ribaudo committed Aug 16, 2022
1 parent 343b269 commit 819d39f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 12 deletions.
12 changes: 4 additions & 8 deletions packages/babel-parser/src/plugin-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,10 @@ export function validatePlugins(plugins: PluginList) {
"decorators",
"decoratorsBeforeExport",
);
if (decoratorsBeforeExport == null) {
throw new Error(
"The 'decorators' plugin requires a 'decoratorsBeforeExport' option," +
" whose value must be a boolean. If you are migrating from" +
" Babylon/Babel 6 or want to use the old decorators proposal, you" +
" should use the 'decorators-legacy' plugin instead of 'decorators'.",
);
} else if (typeof decoratorsBeforeExport !== "boolean") {
if (
decoratorsBeforeExport != null &&
typeof decoratorsBeforeExport !== "boolean"
) {
throw new Error("'decoratorsBeforeExport' must be a boolean.");
}
}
Expand Down
Empty file.

This file was deleted.

0 comments on commit 819d39f

Please sign in to comment.