Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

Commit

Permalink
Prepare for v4.4.1 (#2120)
Browse files Browse the repository at this point in the history
* Prepare for v4.4.1

* update yarn
  • Loading branch information
nchen63 authored Jan 25, 2017
1 parent c52c828 commit 3d775a2
Show file tree
Hide file tree
Showing 13 changed files with 25 additions and 35 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
Change Log
===

v4.4.1
---

* [bugfix] errant space in recommended ruleset (couldn't find `no-misused-new`)

v4.4.0
---

Expand Down Expand Up @@ -45,7 +50,6 @@ Thanks to our contributors!
* Krati Ahuja
* Martin Probst
* Mohsen Azimi
* Noah Chen
* Romke van der Meulen
* cameron-mcateer

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tslint",
"version": "4.4.0",
"version": "4.4.1",
"description": "An extensible static analysis linter for the TypeScript language",
"bin": {
"tslint": "./bin/tslint"
Expand Down
2 changes: 1 addition & 1 deletion src/configs/latest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export const rules = {
// added in v4.4
"arrow-return-shorthand": true,
"no-unnecessary-initializer": true,
"no-misused-new ": true,
"no-misused-new": true,
};
// tslint:enable object-literal-sort-keys

Expand Down
2 changes: 1 addition & 1 deletion src/linter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ import { arrayify, dedent } from "./utils";
* Linter that can lint multiple files in consecutive runs.
*/
class Linter {
public static VERSION = "4.4.0";
public static VERSION = "4.4.1";

public static findConfiguration = findConfiguration;
public static findConfigurationPath = findConfigurationPath;
Expand Down
2 changes: 1 addition & 1 deletion src/rules/adjacentOverloadSignaturesRule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class AdjacentOverloadSignaturesWalker extends Lint.RuleWalker {

/** 'getOverloadName' may return undefined for nodes that cannot be overloads, e.g. a `const` declaration. */
private checkOverloadsAdjacent<T extends ts.Node>(overloads: T[], getOverload: (node: T) => Overload | undefined) {
let lastKey: string | undefined = undefined;
let lastKey: string | undefined;
const seen = new Set<string>();
for (const node of overloads) {
const overload = getOverload(node);
Expand Down
2 changes: 1 addition & 1 deletion src/rules/commentFormatRule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ class CommentWalker extends Lint.RuleWalker {
if (exceptionsObject["ignore-words"]) {
const ignoreWords = exceptionsObject["ignore-words"] as string[];
this.failureIgnorePart = Rule.IGNORE_WORDS_FAILURE_FACTORY(ignoreWords);
// Converts all exceptions values to strings, trim whitespace, escapes RegExp special characters and combines into alternation
// Converts all exceptions values to strings, trim whitespace, escapes RegExp special characters and combines into alternation
const wordsPattern = ignoreWords
.map(String)
.map((str) => str.trim())
Expand Down
2 changes: 1 addition & 1 deletion src/rules/memberAccessRule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export class MemberAccessWalker extends Lint.RuleWalker {
throw new Error("unhandled node type");
}

let memberName: string|undefined = undefined;
let memberName: string|undefined;
// look for the identifier and get its text
if (node.name !== undefined && node.name.kind === ts.SyntaxKind.Identifier) {
memberName = (node.name as ts.Identifier).text;
Expand Down
2 changes: 1 addition & 1 deletion src/rules/noUnusedVariableRule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ class NoUnusedVariablesWalker extends Lint.RuleWalker {
}

private fail(type: string, name: string, position: number, replacements?: Lint.Replacement[]) {
let fix: Lint.Fix | undefined = undefined;
let fix: Lint.Fix | undefined;
if (replacements && replacements.length) {
fix = new Lint.Fix(Rule.metadata.ruleName, replacements);
}
Expand Down
2 changes: 1 addition & 1 deletion src/rules/oneLineRule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ class OneLineWalker extends Lint.RuleWalker {

const previousNodeLine = this.getLineAndCharacterOfPosition(previousNode.getEnd()).line;
const openBraceLine = this.getLineAndCharacterOfPosition(openBraceToken.getStart()).line;
let failure: string | undefined = undefined;
let failure: string | undefined;

if (this.hasOption(OPTION_BRACE) && previousNodeLine !== openBraceLine) {
failure = Rule.BRACE_FAILURE_STRING;
Expand Down
6 changes: 3 additions & 3 deletions src/rules/preferForOfRule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class PreferForOfWalker extends Lint.BlockScopeAwareRuleWalker<void, Incrementor
protected visitForStatement(node: ts.ForStatement) {
const arrayNodeInfo = this.getForLoopHeaderInfo(node);
const currentBlockScope = this.getCurrentBlockScope();
let indexVariableName: string | undefined = undefined;
let indexVariableName: string | undefined;
if (node.incrementor != null && arrayNodeInfo != null) {
const { indexVariable, arrayToken } = arrayNodeInfo;
indexVariableName = indexVariable.getText();
Expand Down Expand Up @@ -114,8 +114,8 @@ class PreferForOfWalker extends Lint.BlockScopeAwareRuleWalker<void, Incrementor

// returns the iterator and array of a `for` loop if the `for` loop is basic. Otherwise, `null`
private getForLoopHeaderInfo(forLoop: ts.ForStatement) {
let indexVariableName: string | undefined = undefined;
let indexVariable: ts.Identifier | undefined = undefined;
let indexVariableName: string | undefined;
let indexVariable: ts.Identifier | undefined;

// assign `indexVariableName` if initializer is simple and starts at 0
if (forLoop.initializer != null && forLoop.initializer.kind === ts.SyntaxKind.VariableDeclarationList) {
Expand Down
2 changes: 1 addition & 1 deletion src/rules/whitespaceRule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ class WhitespaceWalker extends Lint.RuleWalker {
if (this.hasOption(OPTION_MODULE) && importClause != null) {
// an import clause can have _both_ named bindings and a name (the latter for the default import)
// but the named bindings always come last, so we only need to check that for whitespace
let position: number | undefined = undefined;
let position: number | undefined;
if (importClause.namedBindings !== undefined) {
position = importClause.namedBindings.getEnd();
} else if (importClause.name !== undefined) {
Expand Down
2 changes: 1 addition & 1 deletion src/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export function runTest(testDirectory: string, rulesDirectory?: string | string[
const fileTextWithoutMarkup = parse.removeErrorMarkup(fileText);
const errorsFromMarkup = parse.parseErrorsFromMarkup(fileText);

let program: ts.Program | undefined = undefined;
let program: ts.Program | undefined;
if (tslintConfig !== undefined && tslintConfig.linterOptions && tslintConfig.linterOptions.typeCheck) {
const compilerHost: ts.CompilerHost = {
fileExists: () => true,
Expand Down
28 changes: 7 additions & 21 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,9 @@
dependencies:
"@types/node" "*"

"@types/[email protected]":
version "0.0.30"
resolved "https://registry.yarnpkg.com/@types/underscore.string/-/underscore.string-0.0.30.tgz#b027548c7397bd0de290be70c9f60eb34efe391a"
dependencies:
"@types/underscore" "*"

"@types/underscore@*", "@types/underscore@^1.7.36":
version "1.7.36"
resolved "https://registry.yarnpkg.com/@types/underscore/-/underscore-1.7.36.tgz#e2900fd4ff7a71b742d4a7ab98ffe17b04b068c0"
"@types/update-notifier@^1.0.0":
version "1.0.0"
resolved "https://https://registry.yarnpkg.com/@types/update-notifier/-/update-notifier-1.0.0.tgz#3ae6206a6d67c01ffddb9a1eac4cd9b518d534ee"

ansi-align@^1.1.0:
version "1.1.0"
Expand Down Expand Up @@ -919,7 +913,7 @@ [email protected]:
dependencies:
through "2"

sprintf-js@^1.0.3, sprintf-js@~1.0.2:
sprintf-js@~1.0.2:
version "1.0.3"
resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c"

Expand Down Expand Up @@ -987,8 +981,8 @@ timed-out@^3.0.0:
version "0.0.1"

tslint@latest:
version "4.2.0"
resolved "https://registry.yarnpkg.com/tslint/-/tslint-4.2.0.tgz#b9f5c5b871b784ab2f4809e704ade42d62f523ad"
version "4.4.0"
resolved "https://https://registry.yarnpkg.com/tslint/-/tslint-4.4.0.tgz#748d17bf8598dd044cca5771a03353ea422da29e"
dependencies:
babel-code-frame "^6.20.0"
colors "^1.1.2"
Expand All @@ -997,7 +991,6 @@ tslint@latest:
glob "^7.1.1"
optimist "~0.6.0"
resolve "^1.1.7"
underscore.string "^3.3.4"
update-notifier "^1.0.2"

[email protected]:
Expand All @@ -1012,13 +1005,6 @@ [email protected]:
version "2.1.4"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.1.4.tgz#b53b69fb841126acb1dd4b397d21daba87572251"

underscore.string@^3.3.4:
version "3.3.4"
resolved "https://registry.yarnpkg.com/underscore.string/-/underscore.string-3.3.4.tgz#2c2a3f9f83e64762fdc45e6ceac65142864213db"
dependencies:
sprintf-js "^1.0.3"
util-deprecate "^1.0.2"

unzip-response@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/unzip-response/-/unzip-response-1.0.2.tgz#b984f0877fc0a89c2c773cc1ef7b5b232b5b06fe"
Expand All @@ -1042,7 +1028,7 @@ url-parse-lax@^1.0.0:
dependencies:
prepend-http "^1.0.1"

util-deprecate@^1.0.2, util-deprecate@~1.0.1:
util-deprecate@~1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"

Expand Down

0 comments on commit 3d775a2

Please sign in to comment.