Skip to content

Commit

Permalink
Upgrade dependencies (#212)
Browse files Browse the repository at this point in the history
  • Loading branch information
adidahiya authored Mar 19, 2019
1 parent 691dc3b commit 0ebaba3
Show file tree
Hide file tree
Showing 19 changed files with 319 additions and 184 deletions.
21 changes: 10 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,22 @@
"verify": "run-s build lint test"
},
"dependencies": {
"tsutils": "^2.13.1"
"tsutils": "^3.9.1"
},
"peerDependencies": {
"tslint": "^5.1.0",
"typescript": ">=2.1.0 || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev"
"typescript": ">=2.8.0"
},
"devDependencies": {
"@types/colors": "^1.1.3",
"@types/glob": "^5.0.30",
"@types/node": "^7.0.13",
"colors": "^1.1.2",
"glob": "^7.1.2",
"npm-run-all": "^4.0.2",
"@types/glob": "^7.1.1",
"@types/node": "^11.11.3",
"colors": "^1.3.3",
"glob": "^7.1.3",
"npm-run-all": "^4.1.5",
"path": "^0.12.7",
"tslint": "^5.5.0",
"tslint-language-service": "^0.9.6",
"typescript": "~2.6.2"
"tslint": "^5.14.0",
"typescript-tslint-plugin": "^0.3.1",
"typescript": "~3.1.6"
},
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion src/rules/jsxAlignmentRule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/

import * as Lint from "tslint";
import { isJsxElement, isJsxSelfClosingElement } from "tsutils";
import { isJsxElement, isJsxSelfClosingElement } from "tsutils/typeguard/3.0";
import * as ts from "typescript";

export class Rule extends Lint.Rules.AbstractRule {
Expand Down
2 changes: 1 addition & 1 deletion src/rules/jsxBanElementsRule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/
import * as Lint from "tslint";
import { isJsxOpeningElement, isJsxSelfClosingElement } from "tsutils";
import { isJsxOpeningElement, isJsxSelfClosingElement } from "tsutils/typeguard/3.0";
import * as ts from "typescript";

interface IOption {
Expand Down
2 changes: 1 addition & 1 deletion src/rules/jsxBanPropsRule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/

import * as Lint from "tslint";
import { isIdentifier, isJsxAttribute } from "tsutils";
import { isIdentifier, isJsxAttribute } from "tsutils/typeguard/3.0";
import * as ts from "typescript";

interface IRuleOptions {
Expand Down
4 changes: 2 additions & 2 deletions src/rules/jsxBooleanValueRule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/

import * as Lint from "tslint";
import { isJsxAttribute } from "tsutils";
import { isJsxAttribute } from "tsutils/typeguard/3.0";
import * as ts from "typescript";

const OPTION_ALWAYS = "always";
Expand Down Expand Up @@ -80,7 +80,7 @@ function walk(ctx: Lint.WalkContext<string | undefined>): void {
const width = node.getWidth(ctx.sourceFile);
const start = node.end - width;
const fix = Lint.Replacement.replaceFromTo(
start, node.end, node.getFirstToken(ctx.sourceFile).getText(ctx.sourceFile));
start, node.end, node.getFirstToken(ctx.sourceFile)!.getText(ctx.sourceFile));
ctx.addFailureAt(start, width, Rule.NEVER_MESSAGE, fix);
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/rules/jsxCurlySpacingRule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/

import * as Lint from "tslint";
import { isJsxExpression, isJsxSpreadAttribute } from "tsutils";
import { isJsxExpression, isJsxSpreadAttribute } from "tsutils/typeguard/3.0";
import * as ts from "typescript";
import { getDeleteFixForSpaceBetweenTokens, isMultilineText } from "../utils";

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

function validateBraceSpacing(node: ts.Node) {
const firstToken = node.getFirstToken();
const firstToken = node.getFirstToken()!;
const secondToken = node.getChildAt(1);
const lastToken = node.getLastToken();
const lastToken = node.getLastToken()!;
const secondToLastToken = node.getChildAt(node.getChildCount() - 2);
const nodeStart = node.getStart();
const nodeWidth = node.getWidth();
Expand Down
4 changes: 2 additions & 2 deletions src/rules/jsxEqualsSpacingRule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@

import * as Lint from "tslint";
import {
getNextToken,
isJsxAttribute,
isJsxOpeningElement,
isJsxSelfClosingElement,
} from "tsutils";
} from "tsutils/typeguard/3.0";
import { getNextToken } from "tsutils/util";
import * as ts from "typescript";
import { getDeleteFixForSpaceBetweenTokens } from "../utils";

Expand Down
2 changes: 1 addition & 1 deletion src/rules/jsxKeyRule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import {
isParenthesizedExpression,
isPropertyAccessExpression,
isReturnStatement,
} from "tsutils";
} from "tsutils/typeguard/3.0";
import * as ts from "typescript";

export class Rule extends Lint.Rules.AbstractRule {
Expand Down
2 changes: 1 addition & 1 deletion src/rules/jsxNoBindRule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/

import * as Lint from "tslint";
import { isCallExpression, isJsxAttribute, isJsxExpression } from "tsutils";
import { isCallExpression, isJsxAttribute, isJsxExpression } from "tsutils/typeguard/3.0";
import * as ts from "typescript";

export class Rule extends Lint.Rules.AbstractRule {
Expand Down
2 changes: 1 addition & 1 deletion src/rules/jsxNoLambdaRule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/

import * as Lint from "tslint";
import { isJsxAttribute, isJsxExpression } from "tsutils";
import { isJsxAttribute, isJsxExpression } from "tsutils/typeguard/3.0";
import * as ts from "typescript";

export class Rule extends Lint.Rules.AbstractRule {
Expand Down
2 changes: 1 addition & 1 deletion src/rules/jsxNoMultilineJsRule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/

import * as Lint from "tslint";
import { isJsxExpression } from "tsutils";
import { isJsxExpression } from "tsutils/typeguard/3.0";
import * as ts from "typescript";

export class Rule extends Lint.Rules.AbstractRule {
Expand Down
2 changes: 1 addition & 1 deletion src/rules/jsxNoStringRefRule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/

import * as Lint from "tslint";
import { isJsxAttribute, isJsxExpression, isStringLiteral, isTemplateExpression } from "tsutils";
import { isJsxAttribute, isJsxExpression, isStringLiteral, isTemplateExpression } from "tsutils/typeguard/3.0";
import * as ts from "typescript";

export class Rule extends Lint.Rules.AbstractRule {
Expand Down
2 changes: 1 addition & 1 deletion src/rules/jsxSelfCloseRule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/

import * as Lint from "tslint";
import { isJsxElement } from "tsutils";
import { isJsxElement } from "tsutils/typeguard/3.0";
import * as ts from "typescript";

export class Rule extends Lint.Rules.AbstractRule {
Expand Down
2 changes: 1 addition & 1 deletion src/rules/jsxSpaceBeforeTrailingSlashRule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/

import * as Lint from "tslint";
import { isJsxSelfClosingElement } from "tsutils";
import { isJsxSelfClosingElement } from "tsutils/typeguard/3.0";
import * as ts from "typescript";

export class Rule extends Lint.Rules.AbstractRule {
Expand Down
2 changes: 1 addition & 1 deletion src/rules/jsxUseTranslationFunctionRule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/

import * as Lint from "tslint";
import { isJsxAttribute, isJsxElement, isJsxExpression, isJsxText, isTextualLiteral } from "tsutils";
import { isJsxAttribute, isJsxElement, isJsxExpression, isJsxText, isTextualLiteral } from "tsutils/typeguard/3.0";
import * as ts from "typescript";

interface IOptions {
Expand Down
2 changes: 1 addition & 1 deletion src/rules/jsxWrapMultilineRule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/

import * as Lint from "tslint";
import { isJsxElement, isJsxFragment, isJsxSelfClosingElement } from "tsutils";
import { isJsxElement, isJsxFragment, isJsxSelfClosingElement } from "tsutils/typeguard/3.0";
import * as ts from "typescript";

export class Rule extends Lint.Rules.AbstractRule {
Expand Down
7 changes: 4 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "2.4.2",
"version": "3.1.6",
"compilerOptions": {
"declaration": true,
"lib": ["es6"],
Expand All @@ -16,9 +16,10 @@
"target": "es5",
"plugins": [
{
"name": "tslint-language-service",
"name": "typescript-tslint-plugin",
"alwaysShowRuleFailuresAsWarnings": true,
"ignoreDefinitionFiles": true
"ignoreDefinitionFiles": true,
"configFile": "./tslint.json"
}
]
},
Expand Down
11 changes: 9 additions & 2 deletions tslint.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
{
"extends": "tslint:latest",
"rules": {
"file-header": [true, "Copyright \\d{4} Palantir Technologies, Inc."],
"max-classes-per-file": [true, 2],
"file-header": {
"options": ["Copyright \\d{4} Palantir Technologies, Inc."]
},
"max-classes-per-file": {
"options": [2]
},
"no-default-export": true,
"no-submodule-imports": {
"options": ["tsutils"]
},
"restrict-plus-operands": true,
"strict-boolean-expressions": true
}
Expand Down
Loading

0 comments on commit 0ebaba3

Please sign in to comment.