Skip to content

Commit 1c35934

Browse files
author
Hyunje Jun
committed
Use Prettier instead of TSLint
What we need with TS is a formatter, not a linter.
1 parent 0d201c3 commit 1c35934

File tree

2 files changed

+12
-86
lines changed

2 files changed

+12
-86
lines changed

package-lock.json

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

package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,11 @@
1818
"scripts": {
1919
"pretest": "npm run build",
2020
"test": "API_BASE_URL=http://localhost:1234/ TEST_PORT=1234 mocha -r ts-node/register test/*.spec.ts",
21-
"lint": "tslint '{lib,test}/**/*.ts'",
21+
"prettier": "prettier --parser typescript --trailing-comma all '{lib,test}/**/*.ts'",
22+
"format": "npm run prettier -- --write",
23+
"format:check": "npm run prettier -- -l",
2224
"clean": "del-cli dist",
23-
"prebuild": "npm run lint && npm run clean",
25+
"prebuild": "npm run format:check && npm run clean",
2426
"build": "tsc",
2527
"docs": "gitbook install && gitbook serve docs",
2628
"docs:publish": "./docs/publish.sh",
@@ -48,8 +50,8 @@
4850
"express": "^4.15.3",
4951
"gitbook-cli": "^2.3.0",
5052
"mocha": "^3.4.2",
53+
"prettier": "^1.7.4",
5154
"ts-node": "^3.0.6",
52-
"tslint": "^5.4.3",
5355
"typescript": "^2.3.4"
5456
},
5557
"license": "Apache-2.0"

0 commit comments

Comments
 (0)