Add prettier

This commit is contained in:
Jannis Mattheis 2018-08-22 20:11:38 +02:00
parent 5f21ad9377
commit 1afa51959f
4 changed files with 2632 additions and 2609 deletions

View File

@ -30,6 +30,7 @@ check-go:
check-js:
(cd ui && npm run lint)
(cd ui && npm run testformat)
download-tools:
go get github.com/golang/lint/golint

12
ui/.prettierrc Normal file
View File

@ -0,0 +1,12 @@
{
"printWidth": 100,
"tabWidth": 4,
"useTabs": false,
"semi": true,
"singleQuote": true,
"trailingComma": "es5",
"bracketSpacing": false,
"jsxBracketSameLine": true,
"arrowParens": "always",
"parser": "typescript"
}

5221
ui/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -26,18 +26,21 @@
"test": "react-scripts-ts test --env=jsdom",
"eject": "react-scripts-ts eject",
"lint": "tslint --project .",
"lintfix": "tslint --fix --project ."
"lintfix": "tslint --fix --project .",
"format": "prettier src/**/*.{ts,tsx} --write",
"testformat": "prettier src/**/*.{ts,tsx} --list-different"
},
"devDependencies": {
"@types/notifyjs": "^1.2.30",
"@types/detect-browser": "^2.0.1",
"@types/flux": "^3.1.7",
"@types/jest": "^22.2.3",
"@types/node": "^9.6.5",
"@types/notifyjs": "^1.2.30",
"@types/react": "^16.3.11",
"@types/react-dom": "^16.0.5",
"@types/react-list": "^0.8.3",
"@types/react-router-dom": "^4.2.6",
"prettier": "^1.14.2",
"typescript": "^2.8.1"
}
}