Skip to content

Commit

Permalink
Add prettier in TRSS (#611)
Browse files Browse the repository at this point in the history
- Add prettier module in TRSS (server and client)
- Add configuration file for vscode
- Add script to auto format all files

Related: #591

Signed-off-by: lanxia <[email protected]>
  • Loading branch information
llxia authored Feb 14, 2022
1 parent c0afb96 commit 5a9f5a2
Show file tree
Hide file tree
Showing 7 changed files with 128 additions and 96 deletions.
7 changes: 7 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
}
6 changes: 6 additions & 0 deletions TestResultSummaryService/.prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"trailingComma": "es5",
"tabWidth": 4,
"semi": true,
"singleQuote": true
}
13 changes: 8 additions & 5 deletions TestResultSummaryService/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

84 changes: 43 additions & 41 deletions TestResultSummaryService/package.json
Original file line number Diff line number Diff line change
@@ -1,43 +1,45 @@
{
"name": "TestResultSummaryService",
"version": "0.1.0",
"description": "TestResultSummaryService",
"main": "app.js",
"scripts": {
"test": "echo \"Error: no test specified! Configure in package.json\" && exit 1",
"startFrontend": "nodemon frontend.js --configFile=./trssConf.json",
"startBackend": "nodemon --max-old-space-size=4096 backend.js --configFile=./trssConf.json",
"start": "npm-run-all --parallel startFrontend startBackend"
},
"repository": "",
"keywords": [
"node.js",
"eclipse",
"nodeclipse"
],
"author": "",
"license": "Apache License Version 2.0",
"readmeFilename": "README.md",
"dependencies": {
"bcryptjs": "^2.4.3",
"bluebird": "^3.7.2",
"body-parser": "^1.19.0",
"compression": "^1.7.4",
"cors": "^2.8.5",
"csv": "^5.5.0",
"decompress": "^4.2.1",
"express": "^4.17.1",
"express-swagger-generator": "^1.1.17",
"got": "^9.6.0",
"jenkins-api": "^0.3.1",
"jsonwebtoken": "^8.5.1",
"mathjs": "^7.6.0",
"mongodb": "^3.6.10",
"request": "^2.88.2",
"winston": "^2.4.5"
},
"devDependencies": {
"nodemon": "^1.19.4",
"npm-run-all": "^4.1.5"
}
"name": "TestResultSummaryService",
"version": "0.1.0",
"description": "TestResultSummaryService",
"main": "app.js",
"scripts": {
"test": "echo \"Error: no test specified! Configure in package.json\" && exit 1",
"startFrontend": "nodemon frontend.js --configFile=./trssConf.json",
"startBackend": "nodemon --max-old-space-size=4096 backend.js --configFile=./trssConf.json",
"start": "npm-run-all --parallel startFrontend startBackend",
"prettier": "npx prettier --write ."
},
"repository": "",
"keywords": [
"node.js",
"eclipse",
"nodeclipse"
],
"author": "",
"license": "Apache License Version 2.0",
"readmeFilename": "README.md",
"dependencies": {
"bcryptjs": "^2.4.3",
"bluebird": "^3.7.2",
"body-parser": "^1.19.0",
"compression": "^1.7.4",
"cors": "^2.8.5",
"csv": "^5.5.0",
"decompress": "^4.2.1",
"express": "^4.17.1",
"express-swagger-generator": "^1.1.17",
"got": "^9.6.0",
"jenkins-api": "^0.3.1",
"jsonwebtoken": "^8.5.1",
"mathjs": "^7.6.0",
"mongodb": "^3.6.10",
"request": "^2.88.2",
"winston": "^2.4.5"
},
"devDependencies": {
"nodemon": "^1.19.4",
"npm-run-all": "^4.1.5",
"prettier": "2.5.1"
}
}
6 changes: 6 additions & 0 deletions test-result-summary-client/.prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"trailingComma": "es5",
"tabWidth": 4,
"semi": true,
"singleQuote": true
}
6 changes: 6 additions & 0 deletions test-result-summary-client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

102 changes: 52 additions & 50 deletions test-result-summary-client/package.json
Original file line number Diff line number Diff line change
@@ -1,52 +1,54 @@
{
"name": "test-result-summary-client",
"version": "0.1.0",
"private": true,
"dependencies": {
"@ant-design/compatible": "^1.0.8",
"antd": "^4.16.3",
"classnames": "^2.3.1",
"codemirror": "^5.62.0",
"highcharts": "^9.1.2",
"highcharts-react-official": "^2.2.2",
"highstock-release": "^6.0.4",
"history": "^4.10.1",
"jquery": "^3.6.0",
"mathjs": "^7.6.0",
"mergely": "^4.3.1",
"moment": "^2.29.1",
"npm-check": "^5.9.2",
"qs": "^6.10.1",
"react": "^16.14.0",
"react-day-picker": "^7.4.10",
"react-dom": "^16.14.0",
"react-grid-layout": "^0.16.6",
"react-highcharts": "^16.1.0",
"react-highlight-words": "^0.16.0",
"react-jsx-highcharts": "^3.6.1",
"react-jsx-highstock": "^3.6.1",
"react-nl2br": "^0.6.1",
"react-router": "^5.2.0",
"react-router-dom": "^5.2.0",
"react-table": "^6.11.5",
"sweetalert2": "^10.16.9"
},
"scripts": {
"start": "react-app-rewired start",
"build": "react-app-rewired build",
"test": "react-app-rewired test --env=jsdom",
"cy": "cypress open"
},
"proxy": "http://localhost:3001",
"devDependencies": {
"cypress": "^8.6.0",
"react-app-rewired": "^2.1.8",
"react-scripts": "^3.4.4"
},
"browserslist": [
">0.2%",
"not dead",
"not ie <= 11",
"not op_mini all"
]
"name": "test-result-summary-client",
"version": "0.1.0",
"private": true,
"dependencies": {
"@ant-design/compatible": "^1.0.8",
"antd": "^4.16.3",
"classnames": "^2.3.1",
"codemirror": "^5.62.0",
"highcharts": "^9.1.2",
"highcharts-react-official": "^2.2.2",
"highstock-release": "^6.0.4",
"history": "^4.10.1",
"jquery": "^3.6.0",
"mathjs": "^7.6.0",
"mergely": "^4.3.1",
"moment": "^2.29.1",
"npm-check": "^5.9.2",
"qs": "^6.10.1",
"react": "^16.14.0",
"react-day-picker": "^7.4.10",
"react-dom": "^16.14.0",
"react-grid-layout": "^0.16.6",
"react-highcharts": "^16.1.0",
"react-highlight-words": "^0.16.0",
"react-jsx-highcharts": "^3.6.1",
"react-jsx-highstock": "^3.6.1",
"react-nl2br": "^0.6.1",
"react-router": "^5.2.0",
"react-router-dom": "^5.2.0",
"react-table": "^6.11.5",
"sweetalert2": "^10.16.9"
},
"scripts": {
"start": "react-app-rewired start",
"build": "react-app-rewired build",
"test": "react-app-rewired test --env=jsdom",
"cy": "cypress open",
"prettier": "npx prettier --write ."
},
"proxy": "http://localhost:3001",
"devDependencies": {
"cypress": "^8.6.0",
"prettier": "2.5.1",
"react-app-rewired": "^2.1.8",
"react-scripts": "^3.4.4"
},
"browserslist": [
">0.2%",
"not dead",
"not ie <= 11",
"not op_mini all"
]
}

0 comments on commit 5a9f5a2

Please sign in to comment.