Skip to content

Commit 4dc51de

Browse files
committed
Implement prettier in package.json, Fixes: #220
1 parent 47b2dca commit 4dc51de

File tree

4 files changed

+1372
-12
lines changed

4 files changed

+1372
-12
lines changed

.prettierrc

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"printWidth": 120,
3+
"singleQuote": true,
4+
"useTabs": false,
5+
"tabWidth": 2,
6+
"semi": true,
7+
"bracketSpacing": true,
8+
"jsxBracketSameLine": false,
9+
}

package.json

+6-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@
2323
"distwin": "yarn buildforelectron && electron-builder --win --x64",
2424
"distmac": "yarn buildforelectron && electron-builder --mac --x64",
2525
"release": "build",
26-
"coverage": "ng test --watch=false --code-coverage"
26+
"coverage": "ng test --watch=false --code-coverage",
27+
"prettier:base": "prettier",
28+
"prettier:check": "yarn prettier:base -- --list-different \"src/**/*.{ts,js,html,scss}\"",
29+
"prettier:write": "yarn prettier:base -- --write \"src/**/*.{ts,js,html,scss}\""
2730
},
2831
"private": true,
2932
"dependencies": {
@@ -82,10 +85,12 @@
8285
"karma-jasmine-html-reporter": "^1.4.0",
8386
"node-sass": "^4.10.0",
8487
"popper.js": "^1.14.5",
88+
"prettier": "^1.15.2",
8589
"protractor": "~5.4.1",
8690
"ts-mockito": "^2.3.1",
8791
"ts-node": "~7.0.1",
8892
"tslint": "~5.11.0",
93+
"tslint-config-prettier": "^1.16.0",
8994
"typescript": "3.1.6"
9095
},
9196
"greenkeeper": {

tslint.json

+25-11
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,10 @@
1111
"check-space"
1212
],
1313
"curly": true,
14-
"deprecation": {
15-
"severity": "warn"
16-
},
1714
"eofline": true,
1815
"forin": true,
1916
"import-blacklist": [
20-
true,
21-
"rxjs/Rx"
17+
true
2218
],
2319
"import-spacing": true,
2420
"indent": [
@@ -65,12 +61,11 @@
6561
],
6662
"no-misused-new": true,
6763
"no-non-null-assertion": true,
68-
"no-redundant-jsdoc": true,
6964
"no-shadowed-variable": true,
7065
"no-string-literal": false,
7166
"no-string-throw": true,
7267
"no-switch-case-fall-through": true,
73-
"no-trailing-whitespace": true,
68+
"no-trailing-whitespace": false,
7469
"no-unnecessary-initializer": true,
7570
"no-unused-expression": true,
7671
"no-use-before-declare": true,
@@ -85,7 +80,7 @@
8580
],
8681
"prefer-const": true,
8782
"quotemark": [
88-
true,
83+
false,
8984
"single"
9085
],
9186
"radix": true,
@@ -107,6 +102,7 @@
107102
"variable-declaration": "nospace"
108103
}
109104
],
105+
"typeof-compare": true,
110106
"unified-signatures": true,
111107
"variable-name": false,
112108
"whitespace": [
@@ -117,7 +113,18 @@
117113
"check-separator",
118114
"check-type"
119115
],
120-
"no-output-on-prefix": true,
116+
"directive-selector": [
117+
true,
118+
"attribute",
119+
"app",
120+
"camelCase"
121+
],
122+
"component-selector": [
123+
true,
124+
"element",
125+
"app",
126+
"kebab-case"
127+
],
121128
"use-input-property-decorator": true,
122129
"use-output-property-decorator": true,
123130
"use-host-property-decorator": true,
@@ -126,6 +133,13 @@
126133
"use-life-cycle-interface": true,
127134
"use-pipe-transform-interface": true,
128135
"component-class-suffix": true,
129-
"directive-class-suffix": true
130-
}
136+
"directive-class-suffix": true,
137+
"no-access-missing-member": true,
138+
"templates-use-public": true,
139+
"invoke-injectable": true
140+
},
141+
"extends": [
142+
"tslint:latest",
143+
"tslint-config-prettier"
144+
]
131145
}

0 commit comments

Comments
 (0)