Add eslint and prettier.

This commit is contained in:
Yang Chen
2019-11-07 01:14:13 +11:00
parent 137c96a972
commit b3b6b3a7f6
8 changed files with 995 additions and 23 deletions
+9 -1
View File
@@ -6,7 +6,8 @@
"main": "lib/main.js",
"scripts": {
"build": "tsc",
"test": "jest"
"test": "tsc --noEmit && jest",
"lint": "eslint . --ext .ts"
},
"repository": {
"type": "git",
@@ -27,8 +28,15 @@
"devDependencies": {
"@types/jest": "^24.0.13",
"@types/node": "^12.0.4",
"@typescript-eslint/eslint-plugin": "^2.6.1",
"@typescript-eslint/parser": "^2.6.1",
"eslint": "^6.6.0",
"eslint-config-prettier": "^6.5.0",
"eslint-plugin-import": "^2.18.2",
"eslint-plugin-prettier": "^3.1.1",
"jest": "^24.8.0",
"jest-circus": "^24.7.1",
"prettier": "^1.18.2",
"ts-jest": "^24.0.2",
"typescript": "^3.5.1"
}