[Solved] Eslint config for dynamic imports?

Since I switched to dynamic imports, I am getting errors from eslint, as my configuration does not support these yet. I searched a lot on Google how to do this correctly, but the only info I found was this issue that has been closed due to age, but does not appear to be resolved yet:

Did anyone else manage to configure eslint correctly (or, even better, prettier-eslint inside VS Code)?

Adding

parser: 'babel-eslint'

on top level of .eslintrc did the trick.

I had it under parserOptions, which did not work.

To do this I use babel-eslint parser, eslint-plugin-import and eslint-import-resolver-meteor

1 Like