Use the following commands to configure Sonar scanning for your project(s)
npx nx g @koliveira15/nx-sonarqube:config my-project
npx nx sonar my-project
npx nx affected --target sonar --parallel 1
npx nx run-many --target sonar --projects my-project my-second-project --parallel 1