I'm having some issues running a scan of Vue.js code with SonarQube. I'm running the scan using SonarQube scanner (installed with yarn)
yarn sonar-scanner
The scan appears to go well, the scan does complete and I do get a list of items to fix on the SonarQube dashboard - however at some point I receive a wall of errors like these in the middle of the scan:
ERROR: Failed to parse file [FILENAME] at line 27: 'import' and 'export' may appear only with 'sourceType: module'
This happens regardless of whether it's importing a component or just a module like Axios.
import Axios from 'axios'
import Component from '@/src/js/global/component';
Things i've looked at
- Make sure sourceType is set to 'module' in .eslintrc.json => It is set to module
- Checking if there is a Vue.js specific configuration for SonarQube => Do not see any specific documentation regarding configuring SonarQube for Vue.js
- Saw the following post, but not using TypeScript: SonarQube-Scanner fails to analyze Vue files - Failed to parse file [.vue]
Anyone suggestions would be appreciated.