Skip to content

Commit b501093

Browse files
committed
Setup prettier on package.json
1 parent fb6c06c commit b501093

File tree

4 files changed

+19
-2
lines changed

4 files changed

+19
-2
lines changed

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
src/api.ts

package-lock.json

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
"main": "dist/index.js",
1515
"types": "dist/index.d.ts",
1616
"scripts": {
17-
"lint": "tslint --project \".\"",
17+
"format": "prettier --loglevel error --write './src/**/*.ts'",
18+
"lint": "tslint --project \".\" && prettier --check './src/**/*.ts'",
1819
"lint-examples": "tslint --project \"./examples/typescript\"",
1920
"clean": "rm -Rf node_modules/ dist/",
2021
"build": "tsc",
@@ -71,6 +72,7 @@
7172
"mocha": "^5.2.0",
7273
"mock-fs": "^4.7.0",
7374
"nyc": "^13.1.0",
75+
"prettier": "~1.16.4",
7476
"source-map-support": "^0.5.9",
7577
"stream-buffers": "^3.0.2",
7678
"ts-mockito": "^2.3.1",
@@ -85,5 +87,12 @@
8587
"keywords": [
8688
"kubernetes",
8789
"client"
88-
]
90+
],
91+
"prettier": {
92+
"tabWidth": 4,
93+
"printWidth": 110,
94+
"trailingComma": "all",
95+
"singleQuote": true,
96+
"arrowParens": "always"
97+
}
8998
}

tslint.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"quotemark": [true, "single", "avoid-escape", "avoid-template"],
1414
"interface-name": [true, "never-prefix"],
1515
"object-literal-sort-keys": false,
16+
"object-literal-key-quotes": [true, "as-needed"],
1617
"max-classes-per-file": false
1718
},
1819
"rulesDirectory": []

0 commit comments

Comments
 (0)