Implement prettier in package.json, Fixes: #220

This commit is contained in:
ziajka 2018-12-10 13:44:49 +01:00
parent 47b2dcaf62
commit 4dc51de39f
4 changed files with 1372 additions and 12 deletions

9
.prettierrc Normal file
View File

@ -0,0 +1,9 @@
{
"printWidth": 120,
"singleQuote": true,
"useTabs": false,
"tabWidth": 2,
"semi": true,
"bracketSpacing": true,
"jsxBracketSameLine": false,
}

View File

@ -23,7 +23,10 @@
"distwin": "yarn buildforelectron && electron-builder --win --x64",
"distmac": "yarn buildforelectron && electron-builder --mac --x64",
"release": "build",
"coverage": "ng test --watch=false --code-coverage"
"coverage": "ng test --watch=false --code-coverage",
"prettier:base": "prettier",
"prettier:check": "yarn prettier:base -- --list-different \"src/**/*.{ts,js,html,scss}\"",
"prettier:write": "yarn prettier:base -- --write \"src/**/*.{ts,js,html,scss}\""
},
"private": true,
"dependencies": {
@ -82,10 +85,12 @@
"karma-jasmine-html-reporter": "^1.4.0",
"node-sass": "^4.10.0",
"popper.js": "^1.14.5",
"prettier": "^1.15.2",
"protractor": "~5.4.1",
"ts-mockito": "^2.3.1",
"ts-node": "~7.0.1",
"tslint": "~5.11.0",
"tslint-config-prettier": "^1.16.0",
"typescript": "3.1.6"
},
"greenkeeper": {

View File

@ -11,14 +11,10 @@
"check-space"
],
"curly": true,
"deprecation": {
"severity": "warn"
},
"eofline": true,
"forin": true,
"import-blacklist": [
true,
"rxjs/Rx"
true
],
"import-spacing": true,
"indent": [
@ -65,12 +61,11 @@
],
"no-misused-new": true,
"no-non-null-assertion": true,
"no-redundant-jsdoc": true,
"no-shadowed-variable": true,
"no-string-literal": false,
"no-string-throw": true,
"no-switch-case-fall-through": true,
"no-trailing-whitespace": true,
"no-trailing-whitespace": false,
"no-unnecessary-initializer": true,
"no-unused-expression": true,
"no-use-before-declare": true,
@ -85,7 +80,7 @@
],
"prefer-const": true,
"quotemark": [
true,
false,
"single"
],
"radix": true,
@ -107,6 +102,7 @@
"variable-declaration": "nospace"
}
],
"typeof-compare": true,
"unified-signatures": true,
"variable-name": false,
"whitespace": [
@ -117,7 +113,18 @@
"check-separator",
"check-type"
],
"no-output-on-prefix": true,
"directive-selector": [
true,
"attribute",
"app",
"camelCase"
],
"component-selector": [
true,
"element",
"app",
"kebab-case"
],
"use-input-property-decorator": true,
"use-output-property-decorator": true,
"use-host-property-decorator": true,
@ -126,6 +133,13 @@
"use-life-cycle-interface": true,
"use-pipe-transform-interface": true,
"component-class-suffix": true,
"directive-class-suffix": true
}
"directive-class-suffix": true,
"no-access-missing-member": true,
"templates-use-public": true,
"invoke-injectable": true
},
"extends": [
"tslint:latest",
"tslint-config-prettier"
]
}

1332
yarn.lock

File diff suppressed because it is too large Load Diff