How to use babel-eslint

Comprehensive babel-eslint code examples:

How to use babel-eslint.parse:

88
89
90
91
92
93
94
95
96
97
const licenses = options.licenses;

assert(!!licenses, '"licenses" option is required');

return licenses.map((license, i) => {
  const parsed = babelEslint.parse(license);
  assert(
    !parsed.body.length,
    `"licenses[${i}]" option must only include a single comment`
  );