I was trying to change some unwanted automatic formatting in my VS-Code and seem to have broken my app. I was removing/reinstalling eslint and prettier. When I try to run my start script I get the following error:
./src/index.js
Line 1:1: Parsing error: 'import' and 'export' may appear only with 'sourceType: module'
My index.js file looks like this:
I don't think I had this error before.
I've ran npx eslint --init
and set up my eslintrc.json file as follows:
From what I've read, this line should have fixed it: "sourceType": "module"
, but it's not done so. I've tried uninstalling and reinstalling eslint, and I've tried restarting my computer.