ignore eslint error: ‘import’ and ‘export’ may only appear at the top level

ESLint natively doesnt support this because this is against the spec. But if you use babel-eslint parser then inside your eslint config file you can do this: { “parser”: “babel-eslint”, “parserOptions”: { “sourceType”: “module”, “allowImportExportEverywhere”: true } } Doc ref: https://github.com/babel/babel-eslint#configuration

What is “Linting”?

Linting is the process of running a program that will analyse code for potential errors. See lint on wikipedia: lint was the name originally given to a particular program that flagged some suspicious and non-portable constructs (likely to be bugs) in C language source code. The term is now applied generically to tools that flag … Read more

error code: 521