Skip to content

Commit 0ebaba3

Browse files
authored
Upgrade dependencies (#212)
1 parent 691dc3b commit 0ebaba3

19 files changed

+319
-184
lines changed

package.json

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,22 @@
1212
"verify": "run-s build lint test"
1313
},
1414
"dependencies": {
15-
"tsutils": "^2.13.1"
15+
"tsutils": "^3.9.1"
1616
},
1717
"peerDependencies": {
1818
"tslint": "^5.1.0",
19-
"typescript": ">=2.1.0 || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev"
19+
"typescript": ">=2.8.0"
2020
},
2121
"devDependencies": {
22-
"@types/colors": "^1.1.3",
23-
"@types/glob": "^5.0.30",
24-
"@types/node": "^7.0.13",
25-
"colors": "^1.1.2",
26-
"glob": "^7.1.2",
27-
"npm-run-all": "^4.0.2",
22+
"@types/glob": "^7.1.1",
23+
"@types/node": "^11.11.3",
24+
"colors": "^1.3.3",
25+
"glob": "^7.1.3",
26+
"npm-run-all": "^4.1.5",
2827
"path": "^0.12.7",
29-
"tslint": "^5.5.0",
30-
"tslint-language-service": "^0.9.6",
31-
"typescript": "~2.6.2"
28+
"tslint": "^5.14.0",
29+
"typescript-tslint-plugin": "^0.3.1",
30+
"typescript": "~3.1.6"
3231
},
3332
"repository": {
3433
"type": "git",

src/rules/jsxAlignmentRule.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*/
1717

1818
import * as Lint from "tslint";
19-
import { isJsxElement, isJsxSelfClosingElement } from "tsutils";
19+
import { isJsxElement, isJsxSelfClosingElement } from "tsutils/typeguard/3.0";
2020
import * as ts from "typescript";
2121

2222
export class Rule extends Lint.Rules.AbstractRule {

src/rules/jsxBanElementsRule.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* limitations under the License.
1616
*/
1717
import * as Lint from "tslint";
18-
import { isJsxOpeningElement, isJsxSelfClosingElement } from "tsutils";
18+
import { isJsxOpeningElement, isJsxSelfClosingElement } from "tsutils/typeguard/3.0";
1919
import * as ts from "typescript";
2020

2121
interface IOption {

src/rules/jsxBanPropsRule.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*/
1717

1818
import * as Lint from "tslint";
19-
import { isIdentifier, isJsxAttribute } from "tsutils";
19+
import { isIdentifier, isJsxAttribute } from "tsutils/typeguard/3.0";
2020
import * as ts from "typescript";
2121

2222
interface IRuleOptions {

src/rules/jsxBooleanValueRule.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*/
1717

1818
import * as Lint from "tslint";
19-
import { isJsxAttribute } from "tsutils";
19+
import { isJsxAttribute } from "tsutils/typeguard/3.0";
2020
import * as ts from "typescript";
2121

2222
const OPTION_ALWAYS = "always";
@@ -80,7 +80,7 @@ function walk(ctx: Lint.WalkContext<string | undefined>): void {
8080
const width = node.getWidth(ctx.sourceFile);
8181
const start = node.end - width;
8282
const fix = Lint.Replacement.replaceFromTo(
83-
start, node.end, node.getFirstToken(ctx.sourceFile).getText(ctx.sourceFile));
83+
start, node.end, node.getFirstToken(ctx.sourceFile)!.getText(ctx.sourceFile));
8484
ctx.addFailureAt(start, width, Rule.NEVER_MESSAGE, fix);
8585
}
8686
}

src/rules/jsxCurlySpacingRule.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*/
1717

1818
import * as Lint from "tslint";
19-
import { isJsxExpression, isJsxSpreadAttribute } from "tsutils";
19+
import { isJsxExpression, isJsxSpreadAttribute } from "tsutils/typeguard/3.0";
2020
import * as ts from "typescript";
2121
import { getDeleteFixForSpaceBetweenTokens, isMultilineText } from "../utils";
2222

@@ -73,9 +73,9 @@ function walk(ctx: Lint.WalkContext<string | undefined>): void {
7373
});
7474

7575
function validateBraceSpacing(node: ts.Node) {
76-
const firstToken = node.getFirstToken();
76+
const firstToken = node.getFirstToken()!;
7777
const secondToken = node.getChildAt(1);
78-
const lastToken = node.getLastToken();
78+
const lastToken = node.getLastToken()!;
7979
const secondToLastToken = node.getChildAt(node.getChildCount() - 2);
8080
const nodeStart = node.getStart();
8181
const nodeWidth = node.getWidth();

src/rules/jsxEqualsSpacingRule.ts

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

1818
import * as Lint from "tslint";
1919
import {
20-
getNextToken,
2120
isJsxAttribute,
2221
isJsxOpeningElement,
2322
isJsxSelfClosingElement,
24-
} from "tsutils";
23+
} from "tsutils/typeguard/3.0";
24+
import { getNextToken } from "tsutils/util";
2525
import * as ts from "typescript";
2626
import { getDeleteFixForSpaceBetweenTokens } from "../utils";
2727

src/rules/jsxKeyRule.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import {
3131
isParenthesizedExpression,
3232
isPropertyAccessExpression,
3333
isReturnStatement,
34-
} from "tsutils";
34+
} from "tsutils/typeguard/3.0";
3535
import * as ts from "typescript";
3636

3737
export class Rule extends Lint.Rules.AbstractRule {

src/rules/jsxNoBindRule.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*/
1717

1818
import * as Lint from "tslint";
19-
import { isCallExpression, isJsxAttribute, isJsxExpression } from "tsutils";
19+
import { isCallExpression, isJsxAttribute, isJsxExpression } from "tsutils/typeguard/3.0";
2020
import * as ts from "typescript";
2121

2222
export class Rule extends Lint.Rules.AbstractRule {

src/rules/jsxNoLambdaRule.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*/
1717

1818
import * as Lint from "tslint";
19-
import { isJsxAttribute, isJsxExpression } from "tsutils";
19+
import { isJsxAttribute, isJsxExpression } from "tsutils/typeguard/3.0";
2020
import * as ts from "typescript";
2121

2222
export class Rule extends Lint.Rules.AbstractRule {

src/rules/jsxNoMultilineJsRule.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*/
1717

1818
import * as Lint from "tslint";
19-
import { isJsxExpression } from "tsutils";
19+
import { isJsxExpression } from "tsutils/typeguard/3.0";
2020
import * as ts from "typescript";
2121

2222
export class Rule extends Lint.Rules.AbstractRule {

src/rules/jsxNoStringRefRule.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*/
1717

1818
import * as Lint from "tslint";
19-
import { isJsxAttribute, isJsxExpression, isStringLiteral, isTemplateExpression } from "tsutils";
19+
import { isJsxAttribute, isJsxExpression, isStringLiteral, isTemplateExpression } from "tsutils/typeguard/3.0";
2020
import * as ts from "typescript";
2121

2222
export class Rule extends Lint.Rules.AbstractRule {

src/rules/jsxSelfCloseRule.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*/
1717

1818
import * as Lint from "tslint";
19-
import { isJsxElement } from "tsutils";
19+
import { isJsxElement } from "tsutils/typeguard/3.0";
2020
import * as ts from "typescript";
2121

2222
export class Rule extends Lint.Rules.AbstractRule {

src/rules/jsxSpaceBeforeTrailingSlashRule.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*/
1717

1818
import * as Lint from "tslint";
19-
import { isJsxSelfClosingElement } from "tsutils";
19+
import { isJsxSelfClosingElement } from "tsutils/typeguard/3.0";
2020
import * as ts from "typescript";
2121

2222
export class Rule extends Lint.Rules.AbstractRule {

src/rules/jsxUseTranslationFunctionRule.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*/
1717

1818
import * as Lint from "tslint";
19-
import { isJsxAttribute, isJsxElement, isJsxExpression, isJsxText, isTextualLiteral } from "tsutils";
19+
import { isJsxAttribute, isJsxElement, isJsxExpression, isJsxText, isTextualLiteral } from "tsutils/typeguard/3.0";
2020
import * as ts from "typescript";
2121

2222
interface IOptions {

src/rules/jsxWrapMultilineRule.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*/
1717

1818
import * as Lint from "tslint";
19-
import { isJsxElement, isJsxFragment, isJsxSelfClosingElement } from "tsutils";
19+
import { isJsxElement, isJsxFragment, isJsxSelfClosingElement } from "tsutils/typeguard/3.0";
2020
import * as ts from "typescript";
2121

2222
export class Rule extends Lint.Rules.AbstractRule {

tsconfig.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "2.4.2",
2+
"version": "3.1.6",
33
"compilerOptions": {
44
"declaration": true,
55
"lib": ["es6"],
@@ -16,9 +16,10 @@
1616
"target": "es5",
1717
"plugins": [
1818
{
19-
"name": "tslint-language-service",
19+
"name": "typescript-tslint-plugin",
2020
"alwaysShowRuleFailuresAsWarnings": true,
21-
"ignoreDefinitionFiles": true
21+
"ignoreDefinitionFiles": true,
22+
"configFile": "./tslint.json"
2223
}
2324
]
2425
},

tslint.json

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
11
{
22
"extends": "tslint:latest",
33
"rules": {
4-
"file-header": [true, "Copyright \\d{4} Palantir Technologies, Inc."],
5-
"max-classes-per-file": [true, 2],
4+
"file-header": {
5+
"options": ["Copyright \\d{4} Palantir Technologies, Inc."]
6+
},
7+
"max-classes-per-file": {
8+
"options": [2]
9+
},
610
"no-default-export": true,
11+
"no-submodule-imports": {
12+
"options": ["tsutils"]
13+
},
714
"restrict-plus-operands": true,
815
"strict-boolean-expressions": true
916
}

0 commit comments

Comments
 (0)