diff --git a/CHANGELOG.md b/CHANGELOG.md index 6ce09e3f0fd..3ad5e459a6d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,11 @@ Change Log === +v4.4.1 +--- + +* [bugfix] errant space in recommended ruleset (couldn't find `no-misused-new`) + v4.4.0 --- @@ -45,7 +50,6 @@ Thanks to our contributors! * Krati Ahuja * Martin Probst * Mohsen Azimi -* Noah Chen * Romke van der Meulen * cameron-mcateer diff --git a/package.json b/package.json index 7d01bd664ac..bc8dd853844 100644 --- a/package.json +++ b/package.json @@ -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" diff --git a/src/configs/latest.ts b/src/configs/latest.ts index 2bc6fca18e1..0a10c824dec 100644 --- a/src/configs/latest.ts +++ b/src/configs/latest.ts @@ -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 diff --git a/src/linter.ts b/src/linter.ts index 994e5305a08..b66d02e2a0f 100644 --- a/src/linter.ts +++ b/src/linter.ts @@ -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; diff --git a/src/rules/adjacentOverloadSignaturesRule.ts b/src/rules/adjacentOverloadSignaturesRule.ts index eb896aefee6..c44db5ee8ba 100644 --- a/src/rules/adjacentOverloadSignaturesRule.ts +++ b/src/rules/adjacentOverloadSignaturesRule.ts @@ -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(overloads: T[], getOverload: (node: T) => Overload | undefined) { - let lastKey: string | undefined = undefined; + let lastKey: string | undefined; const seen = new Set(); for (const node of overloads) { const overload = getOverload(node); diff --git a/src/rules/commentFormatRule.ts b/src/rules/commentFormatRule.ts index b2dfa406764..995ec565203 100644 --- a/src/rules/commentFormatRule.ts +++ b/src/rules/commentFormatRule.ts @@ -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()) diff --git a/src/rules/memberAccessRule.ts b/src/rules/memberAccessRule.ts index 391a92e8e2a..84a6f33a1d4 100644 --- a/src/rules/memberAccessRule.ts +++ b/src/rules/memberAccessRule.ts @@ -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; diff --git a/src/rules/noUnusedVariableRule.ts b/src/rules/noUnusedVariableRule.ts index dfa3c74c260..437cfd1e53a 100644 --- a/src/rules/noUnusedVariableRule.ts +++ b/src/rules/noUnusedVariableRule.ts @@ -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); } diff --git a/src/rules/oneLineRule.ts b/src/rules/oneLineRule.ts index 89ae394d58d..89304f96cc0 100644 --- a/src/rules/oneLineRule.ts +++ b/src/rules/oneLineRule.ts @@ -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; diff --git a/src/rules/preferForOfRule.ts b/src/rules/preferForOfRule.ts index d4e546df2c9..9749e333d64 100644 --- a/src/rules/preferForOfRule.ts +++ b/src/rules/preferForOfRule.ts @@ -59,7 +59,7 @@ class PreferForOfWalker extends Lint.BlockScopeAwareRuleWalker true, diff --git a/yarn.lock b/yarn.lock index 1b29d28be62..fee9777b8f0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -57,15 +57,9 @@ dependencies: "@types/node" "*" -"@types/underscore.string@0.0.30": - 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" @@ -919,7 +913,7 @@ split@0.3: 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" @@ -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" @@ -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" type-detect@0.1.1: @@ -1012,13 +1005,6 @@ typescript@2.1.4: 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" @@ -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"