Skip to content

Commit 0274483

Browse files
committed
Add tslint
1 parent a9f714c commit 0274483

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,12 @@
88
"scripts": {
99
"build": "tsc && rollup -c",
1010
"clean": "rimraf dist",
11+
"lint": "tslint --project tsconfig.json",
1112
"prebuild": "npm run clean",
1213
"prepare": "npm run build",
1314
"prepublishOnly": "pkg-ok",
1415
"start": "jest --watch",
15-
"test": "jest"
16+
"test": "jest && npm run lint"
1617
},
1718
"repository": {
1819
"type": "git",
@@ -40,6 +41,7 @@
4041
"rimraf": "2.6.2",
4142
"rollup": "0.63.4",
4243
"ts-jest": "23.0.1",
44+
"tslint": "5.11.0",
4345
"typescript": "2.9.2"
4446
},
4547
"jest": {

tslint.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"defaultSeverity": "error",
3+
"extends": [
4+
"tslint:recommended"
5+
],
6+
"jsRules": {},
7+
"rules": {
8+
"quotemark": [true, "single"],
9+
"ban-types": [
10+
true,
11+
["Object", "Avoid using the `Object` type. Did you mean `object`?"],
12+
["Boolean", "Avoid using the `Boolean` type. Did you mean `boolean`?"],
13+
["Number", "Avoid using the `Number` type. Did you mean `number`?"],
14+
["String", "Avoid using the `String` type. Did you mean `string`?"],
15+
["Symbol", "Avoid using the `Symbol` type. Did you mean `symbol`?"]
16+
]
17+
},
18+
"rulesDirectory": []
19+
}

0 commit comments

Comments
 (0)