Solution :
The older versions of the Babel came with everything out of a box. But now the newer version requires you to install whichever plug-in your setup needs. So first, you will need to install a ES2015 preset by below command.
npm install babel-preset-es2015 --save-dev
Next, you just need to tell the babelify to use a preset you have just installed.
return browserify({ ... })
.transform(babelify.configure({
presets: ["es2015"]
}))
...
OR
ESLint natively doesnt support this as this is against a spec. But if you use the babel-eslint parser then inside your eslint config file you can do this as shown below :
{
"parser": "babel-eslint",
"parserOptions": {
"sourceType": "module",
"allowImportExportEverywhere": true
}
}