Skip to content

Commit 36b8d69

Browse files
committed
build: add tslint support
1 parent 7030534 commit 36b8d69

3 files changed

Lines changed: 60 additions & 7 deletions

File tree

package.json

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"scripts": {
77
"preinstall": "typings install",
88
"dev": "webpack-dev-server --inline --hot",
9-
"build": "webpack"
9+
"build": "webpack",
10+
"tslint": "node_modules/.bin/tslint **/*.ts -e typings"
1011
},
1112
"author": "rychko.georgiy@gmail.com",
1213
"license": "MIT",
@@ -17,20 +18,22 @@
1718
"@angular/platform-browser": "2.0.0-rc.2",
1819
"@angular/platform-browser-dynamic": "2.0.0-rc.2",
1920
"es6-shim": "0.35.0",
20-
"file-loader": "0.8.5",
2121
"font-awesome": "4.6.1",
2222
"lodash": "4.6.1",
2323
"reflect-metadata": "0.1.2",
2424
"rxjs": "5.0.0-beta.6",
2525
"systemjs": "0.19.23",
26-
"ts-loader": "0.8.1",
2726
"typescript": "1.8.2",
28-
"url-loader": "0.5.7",
29-
"webpack": "1.12.14",
30-
"zone.js": "0.6.12"
27+
"zone.js": "0.6.12",
28+
"webpack": "1.12.14"
3129
},
3230
"devDependencies": {
3331
"clean-webpack-plugin": "0.1.8",
32+
"ts-loader": "0.8.1",
33+
"file-loader": "0.8.5",
34+
"url-loader": "0.5.7",
35+
"tslint": "3.11.0",
36+
"codelyzer": "0.0.23",
3437
"css-loader": "0.23.1",
3538
"html-webpack-plugin": "2.9.0",
3639
"raw-loader": "0.5.1",

src/branchy.types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export enum TreeStatus {
2626
}
2727

2828
export interface RenamableNode {
29-
setName: (name: string) => void
29+
setName: (name: string) => void;
3030
toString: () => string;
3131
}
3232

tslint.json

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
{
2+
"rulesDirectory": ["./node_modules/codelyzer"],
3+
"rules": {
4+
"class-name": true,
5+
"curly": true,
6+
"eofline": false,
7+
"forin": true,
8+
"indent": [true, 4],
9+
"label-position": true,
10+
"label-undefined": true,
11+
"max-line-length": [true, 120],
12+
"no-arg": true,
13+
"no-bitwise": true,
14+
"no-console": [true,
15+
"debug",
16+
"info",
17+
"time",
18+
"timeEnd",
19+
"trace"
20+
],
21+
"no-construct": true,
22+
"no-debugger": true,
23+
"no-duplicate-key": true,
24+
"no-duplicate-variable": true,
25+
"no-empty": false,
26+
"no-eval": true,
27+
"no-string-literal": false,
28+
"no-trailing-whitespace": true,
29+
"no-unused-variable": false,
30+
"no-unreachable": true,
31+
"no-use-before-declare": true,
32+
"one-line": [true,
33+
"check-open-brace",
34+
"check-catch",
35+
"check-else",
36+
"check-whitespace"
37+
],
38+
"quotemark": [true, "single"],
39+
"radix": true,
40+
"semicolon": true,
41+
"triple-equals": [true, "allow-null-check"],
42+
"variable-name": false,
43+
"whitespace": [true,
44+
"check-branch",
45+
"check-decl",
46+
"check-operator",
47+
"check-separator"
48+
]
49+
}
50+
}

0 commit comments

Comments
 (0)