💅 Polish

#4685 Better error messaging when preset options are given without a corresponding preset. (@kaicataldo)

We’ve had a few reports of users not wrapping a preset in [] when passing in options so we added an extra error message for this.

// incorrect, and current gives a unexpected error message{"presets":["preset",{"presetOptions":'hi'}// gets parsed as another preset instead of being part of the "preset"]}// correct{"presets":[["preset",{"presetOptions":'hi'}]]}

ReferenceError: [BABEL] /test.js: Unknown option: base.loose2. Check out http://babeljs.io/docs/usage/options/ for more information about options.
A common cause of this error is the presence of a configuration options object without the corresponding preset name. Example:
Invalid:
`{ presets: [{option: value}] }`
Valid:
`{ presets: [["presetName", {option: value}]] }`
For more detailed information on preset configuration, please see http://babeljs.io/docs/plugins/#pluginpresets-options.