Hi,
Whitespace is not ignored in glob patterns, and treated as part of the names to match. So instead of comma + space, use just comma in a list of items, like this:
sonarlint --exclude '{node_modules/**,pegasus-common/**,pegasus-client-common/**,dist/**,coverage/**,zoah/**,*/**/*.spec.js,xunit.xml}'
(You also forgot a comma between "pegasus-client-common/** dist/**", I corrected that too.)
I quick way to verify your glob pattern is correct is using Bash 4, with the globstar option set:
shopt -s globstar
echo {node_modules/**,pegasus-common/**,pegasus-client-common/**,dist/**,coverage/**,zoah/**,*/**/*.spec.js,xunit.xml}
If the pattern is valid, the output will include files you wanted to match. If you don't see some files that you want to be matched, then the glob pattern has a mistake somewhere.
Cheers,
Janos