Skip to content

Commit

Permalink
Fix config validation message typo (#13515)
Browse files Browse the repository at this point in the history
* Fix config validation message typo

* Fix `checkNoUnwrappedItemOptionPairs` type param
  • Loading branch information
jaeseokk committed Jun 29, 2021
1 parent e6068cd commit 6df0b7c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/babel-core/src/config/validation/options.ts
Expand Up @@ -455,7 +455,7 @@ export function checkNoUnwrappedItemOptionPairs(
) {
e.message +=
`\n- Maybe you meant to use\n` +
`"${type}": [\n ["${lastItem.file.request}", ${JSON.stringify(
`"${type}s": [\n ["${lastItem.file.request}", ${JSON.stringify(
thisItem.value,
undefined,
2,
Expand Down
6 changes: 3 additions & 3 deletions packages/babel-core/test/__snapshots__/option-manager.js.snap
Expand Up @@ -3,7 +3,7 @@
exports[`option-manager config plugin/preset flattening and overriding should throw when an option is following a preset 1`] = `
"[BABEL] unknown: Unknown option: .useSpread. Check out https://babeljs.io/docs/en/babel-core/#options for more information about options.
- Maybe you meant to use
\\"preset\\": [
\\"presets\\": [
[\\"./fixtures/option-manager/babel-preset-bar\\", {
\\"useSpread\\": true
}]
Expand All @@ -14,7 +14,7 @@ To be a valid preset, its name and options should be wrapped in a pair of bracke
exports[`option-manager config plugin/preset flattening and overriding should throw when an option is provided as a plugin 1`] = `
"[BABEL] unknown: .useSpread is not a valid Plugin property
- Maybe you meant to use
\\"plugin\\": [
\\"plugins\\": [
[\\"./fixtures/option-manager/babel-plugin-foo\\", {
\\"useSpread\\": true
}]
Expand All @@ -25,7 +25,7 @@ To be a valid plugin, its name and options should be wrapped in a pair of bracke
exports[`option-manager config plugin/preset flattening and overriding should throw when an option is provided as a preset 1`] = `
"[BABEL] unknown: Unknown option: .useBuiltIns. Check out https://babeljs.io/docs/en/babel-core/#options for more information about options.
- Maybe you meant to use
\\"preset\\": [
\\"presets\\": [
[\\"./fixtures/option-manager/babel-preset-bar\\", {
\\"useBuiltIns\\": \\"entry\\"
}]
Expand Down

0 comments on commit 6df0b7c

Please sign in to comment.