Skip to content
This repository was archived by the owner on Oct 16, 2020. It is now read-only.

Commit d047d67

Browse files
committed
style: use sourcegraph tslint/tsconfig
1 parent 9cd02d0 commit d047d67

37 files changed

+8941
-8763
lines changed

.editorconfig

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,10 @@ insert_final_newline = true
44
end_of_line = lf
55
charset = utf-8
66
trim_trailing_whitespace = true
7-
indent_style = tab
7+
indent_style = space
88
indent_size = 4
99

1010
[*.{json,yml}]
11-
indent_style = space
1211
indent_size = 2
1312

1413
[*.md]

package.json

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"clean": "rimraf lib",
2929
"cover": "nyc --silent --all --require source-map-support/register mocha --timeout 7000 --slow 2000 lib/test/**/*.js",
3030
"test": "mocha --require source-map-support/register --timeout 7000 --slow 2000 lib/test/**/*.js",
31-
"lint": "tslint -t msbuild -c tslint.json 'src/**/*.ts'",
31+
"lint": "tslint -c tslint.json -p .",
3232
"build": "tsc",
3333
"watch": "tsc -w",
3434
"semantic-release": "semantic-release pre && npm publish && semantic-release post",
@@ -56,16 +56,18 @@
5656
"vscode-languageserver-types": "^3.0.3"
5757
},
5858
"devDependencies": {
59+
"@sourcegraph/tsconfig": "^1.0.0",
60+
"@sourcegraph/tslint-config": "^2.0.1",
5961
"@types/chai": "^4.0.0",
6062
"@types/chai-as-promised": "^7.1.0",
6163
"@types/chalk": "^0.4.31",
6264
"@types/glob": "^5.0.30",
63-
"@types/lodash": "^4.14.74",
65+
"@types/lodash": "^4.14.76",
6466
"@types/mocha": "^2.2.41",
6567
"@types/mz": "^0.0.31",
6668
"@types/node": "^7.0.32",
67-
"@types/rimraf": "^2.0.2",
6869
"@types/object-hash": "^0.5.29",
70+
"@types/rimraf": "^2.0.2",
6971
"@types/sinon": "^2.3.5",
7072
"@types/temp": "^0.8.29",
7173
"commitizen": "^2.9.6",
@@ -74,11 +76,12 @@
7476
"mocha": "^3.2.0",
7577
"nyc": "^11.0.2",
7678
"rimraf": "^2.6.1",
77-
"sinon": "^4.0.0",
7879
"semantic-release": "^8.0.0",
80+
"sinon": "^4.0.0",
7981
"source-map-support": "^0.4.11",
8082
"temp": "^0.8.3",
81-
"tslint": "^5.0.0",
83+
"tslint": "^5.7.0",
84+
"tslint-language-service": "^0.9.6",
8285
"validate-commit-msg": "^2.12.2"
8386
},
8487
"bin": {

src/ast.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11

2-
import * as ts from 'typescript';
2+
import * as ts from 'typescript'
33

44
/**
55
* Returns a Generator that walks most of the AST (the part that matters for gathering all references) and emits Nodes
66
*
77
* TODO is this function worth it?
88
*/
99
export function *walkMostAST(node: ts.Node): IterableIterator<ts.Node> {
10-
yield node;
11-
const children = node.getChildren();
12-
for (const child of children) {
13-
if (child) {
14-
yield* walkMostAST(child);
15-
}
16-
}
10+
yield node
11+
const children = node.getChildren()
12+
for (const child of children) {
13+
if (child) {
14+
yield* walkMostAST(child)
15+
}
16+
}
1717
}

0 commit comments

Comments
 (0)