Skip to content

Instantly share code, notes, and snippets.

@azeezat
Last active July 8, 2019 08:38
Show Gist options
  • Save azeezat/a6eb801e2a1903c435b0afc9c19729cb to your computer and use it in GitHub Desktop.
Save azeezat/a6eb801e2a1903c435b0afc9c19729cb to your computer and use it in GitHub Desktop.
Configuring package.json file for Sonarqube on react project
{
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"postbuild": "rimraf build/**/*.map",
"test": "react-scripts test --env=jsdom",
"coverage:dev": "react-scripts test --coverage --watchAll",
"coverage:prod": "react-scripts test --coverage",
"eject": "react-scripts eject"
},
"jest": {
"collectCoverageFrom": [
"**/*.{js,jsx}",
"!coverage/**",
"!node_modules/**",
"!src/index.js",
"!src/setupTests.js",
"!public/**",
"!build/**"
],
"coverageReporters": [
"text",
"lcov",
"json",
"text",
"clover",
"cobertura"
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment