Skip to content

Commit 7af735c

Browse files
committed
add linter step
1 parent 32a03b5 commit 7af735c

File tree

2 files changed

+54
-2
lines changed

2 files changed

+54
-2
lines changed

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,13 +101,15 @@
101101
"vscode:prepublish": "tsc -p ./",
102102
"compile": "tsc -watch -p ./",
103103
"postinstall": "node ./node_modules/vscode/bin/install",
104-
"test": "node ./node_modules/vscode/bin/test"
104+
"test": "node ./node_modules/vscode/bin/test",
105+
"lint": "node ./node_modules/tslint/bin/tslint ./src/*.ts ./src/debugAdapter/*.ts ./test/*.ts"
105106
},
106107
"devDependencies": {
107108
"typescript": "^2.0.3",
108109
"vscode": "^1.0.0",
109110
"mocha": "^2.3.3",
110111
"@types/node": "^6.0.40",
111-
"@types/mocha": "^2.2.32"
112+
"@types/mocha": "^2.2.32",
113+
"tslint": "^4.0.2"
112114
}
113115
}

tslint.json

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
{
2+
"rules": {
3+
"class-name": true,
4+
"comment-format": [
5+
true,
6+
"check-space"
7+
],
8+
"indent": [
9+
true,
10+
"spaces"
11+
],
12+
"no-duplicate-variable": true,
13+
"no-eval": true,
14+
"no-internal-module": true,
15+
"no-trailing-whitespace": true,
16+
"no-var-keyword": true,
17+
"one-line": [
18+
true,
19+
"check-open-brace",
20+
"check-whitespace"
21+
],
22+
"semicolon": true,
23+
"triple-equals": [
24+
true,
25+
"allow-null-check"
26+
],
27+
"typedef-whitespace": [
28+
true,
29+
{
30+
"call-signature": "nospace",
31+
"index-signature": "nospace",
32+
"parameter": "nospace",
33+
"property-declaration": "nospace",
34+
"variable-declaration": "nospace"
35+
}
36+
],
37+
"variable-name": [
38+
true,
39+
"ban-keywords"
40+
],
41+
"whitespace": [
42+
true,
43+
"check-branch",
44+
"check-decl",
45+
"check-operator",
46+
"check-separator",
47+
"check-type"
48+
]
49+
}
50+
}

0 commit comments

Comments
 (0)