Skip to content

Commit 6738645

Browse files
committed
Add tslint config and travis build to lint
1 parent b1c7d1c commit 6738645

File tree

4 files changed

+701
-9
lines changed

4 files changed

+701
-9
lines changed

Diff for: .travis.yml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
sudo: false
2+
language: node_js
3+
node_js:
4+
- "6"
5+
- "4"
6+
7+
cache:
8+
directories:
9+
- $HOME/.yarn-cache
10+
11+
install:
12+
- yarn install --prefer-offline

Diff for: package.json

+8-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
"description": "Render any child view somewhere else on the page.",
55
"main": "index.ts",
66
"scripts": {
7-
"test": "echo \"Error: no test specified\" && exit 1"
7+
"test": "npm run lint",
8+
"lint": "tslint *.ts"
89
},
910
"repository": {
1011
"type": "git",
@@ -27,7 +28,11 @@
2728
"typescript": "^2.0.0"
2829
},
2930
"devDependencies": {
30-
"@angular/core": "^2.0.0",
31-
"typescript": "^2.0.0"
31+
"@angular/compiler": "^4.0.1",
32+
"@angular/core": "^4.0.1",
33+
"codelyzer": "^2.1.1",
34+
"rxjs": "^5.3.0",
35+
"tslint": "^4.0.0",
36+
"typescript": "^2.2.2"
3237
}
3338
}

Diff for: tslint.json

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{
2+
"rulesDirectory": ["node_modules/codelyzer"],
3+
"rules": {
4+
"class-name": true,
5+
"curly": false,
6+
"eofline": true,
7+
"indent": ["spaces"],
8+
"max-line-length": [true, 140],
9+
"member-ordering": [true,
10+
"public-before-private",
11+
"static-before-instance",
12+
"variables-before-functions"
13+
],
14+
"no-arg": true,
15+
"no-construct": true,
16+
"no-duplicate-variable": true,
17+
"no-empty": true,
18+
"no-eval": true,
19+
"no-trailing-whitespace": true,
20+
"no-unused-expression": true,
21+
"one-line": [true,
22+
"check-open-brace",
23+
"check-catch",
24+
"check-else",
25+
"check-whitespace"
26+
],
27+
"quotemark": [true, "single"],
28+
"semicolon": [true, "always"],
29+
"trailing-comma": true,
30+
"triple-equals": true,
31+
"variable-name": false,
32+
"use-input-property-decorator": true,
33+
"use-output-property-decorator": true,
34+
"use-host-property-decorator": false,
35+
"no-input-rename": false,
36+
"no-output-rename": false,
37+
"use-life-cycle-interface": true,
38+
"use-pipe-transform-interface": true,
39+
"component-class-suffix": true,
40+
"directive-class-suffix": true,
41+
"import-destructuring-spacing": true,
42+
"templates-use-public": true,
43+
"no-access-missing-member": true,
44+
"invoke-injectable": true
45+
}
46+
}

0 commit comments

Comments
 (0)