From efabeb21f27f8bfddb8f06eff28f7a08b8a95050 Mon Sep 17 00:00:00 2001 From: Klaus Meinhardt Date: Fri, 25 Aug 2017 22:17:26 +0200 Subject: [PATCH] Prepare release 5.7.0 (#3165) --- CHANGELOG.md | 44 +++++++++++++++++++++++++++++++++++++ package.json | 2 +- src/configs/all.ts | 2 ++ src/configs/latest.ts | 15 +++++++++++++ src/linter.ts | 2 +- src/rules/whitespaceRule.ts | 2 +- 6 files changed, 64 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4b96da3964b..9055970df84 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,50 @@ Change Log === +v5.7.0 +--- + +## :tada: New rules, options, and fixers + +- [new-rule] [`no-parameter-reassignment`](https://palantir.github.io/tslint/rules/no-parameter-reassignment/) (#3045) +- [new-rule-option]: [`object-literal-sort-keys`](https://palantir.github.io/tslint/rules/object-literal-sort-keys/): Add `match-declaration-order` option (#2829) +- [new-rule-option] `check-type-operator` for [`whitespace`](https://palantir.github.io/tslint/rules/whitespace/) rule (#3083) +- [new-rule-option] [`whitespace`](https://palantir.github.io/tslint/rules/whitespace/): Add `check-rest-spread` option (#3089) + +## :hammer_and_wrench: Bugfixes & enhancements + +- [api] `AbstractRule#applyWithFunction` allows additional parameter that is passed through to `walkFn` (#3140) +- [api] `AbstractRule#applyWithFunction` has better type checking for its type parameter (#2660) +- [bugfix] [`member-access`](https://palantir.github.io/tslint/rules/member-access/) autofix now correcly inserts `public` keyword after decorators (#3162) +- [bugfix] [`prefer-const`](https://palantir.github.io/tslint/rules/prefer-const/) correctly handle `catch` without binding parameter introduced in `typescript@2.5.1` (#3151) +- [bugfix] [`no-invalid-template-strings`](https://palantir.github.io/tslint/rules/no-invalid-template-strings/) allows backslash-prefixed template expressions (#3116) +- [bugfix] [`deprecation`](https://palantir.github.io/tslint/rules/deprecation/) no longer shows errors on imports and exports (#3141) +- [bugfix] [`deprecation`](https://palantir.github.io/tslint/rules/deprecation/): fix false positive when calling a function or method where another overload is deprecated (#2883) +- [bugfix] [`whitespace`](https://palantir.github.io/tslint/rules/whitespace/): fixed `"check-separator"` for trivial `for` cases. (#3132) +- [bugfix] [`prefer-object-spread`](https://palantir.github.io/tslint/rules/prefer-object-spread/) prevent spreading `this` as it is not allowed by the compiler (#3126) +- [bugfix] `msbuild` formatter uses backslashes in paths on Windows (#3145) +- [bugfix] [`no-namespace`](https://palantir.github.io/tslint/rules/no-namespace/) ignores global augmentation (#3161) +- [enhancement] remove superfluous empty lines on tslint output. (#3121) +- [enhancement] [`no-submodule-imports`](https://palantir.github.io/tslint/rules/no-submodule-imports/) allows whitelisting of submodules like `@angular/core/testing` (#3129) +- [enhancement] custom lint rules will be resolved using node's path resolution to allow for loaders like `ts-node` (#3108) +- [enhancement] [`quotemark`](https://palantir.github.io/tslint/rules/quotemark/) no longer requires `"single"` or `"double"` to be the first option. The rule defaults to `"double"` if none is specified. (#3114) +- [enhancement] [`no-unused-variable`](https://palantir.github.io/tslint/rules/no-unused-variable/) autofix removes trailing comments of imports (#3156) +- [enhancement] [`no-unnecessary-type-assertion`](https://palantir.github.io/tslint/rules/no-unnecessary-type-assertion/) allows certain necessary assertions to prevent type widening (#3120) + +Thanks to our contributors! + +- Paul Gschwendtner +- Andy Hanson +- ksvitkovsky +- Santi Albo +- aervin +- Junle Li +- Joscha Feth +- WiseBird +- Caleb Eggensperger +- WGroenestein +- Bowen Ni + v5.6.0 --- diff --git a/package.json b/package.json index 91b03f47aed..1031df0b29f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tslint", - "version": "5.6.0", + "version": "5.7.0", "description": "An extensible static analysis linter for the TypeScript language", "bin": { "tslint": "./bin/tslint" diff --git a/src/configs/all.ts b/src/configs/all.ts index 303da0ad586..8fcff0e04af 100644 --- a/src/configs/all.ts +++ b/src/configs/all.ts @@ -254,6 +254,8 @@ export const rules = { "check-type", "check-typecast", "check-preblock", + "check-type-operator", + "check-rest-spread", ], }; diff --git a/src/configs/latest.ts b/src/configs/latest.ts index 4840094794b..a1b01d5b35a 100644 --- a/src/configs/latest.ts +++ b/src/configs/latest.ts @@ -48,6 +48,21 @@ export const rules = { // added in v5.6 "no-duplicate-imports": true, "space-within-parens": [true, 0], + "no-submodule-imports": true, + + // added in v5.7 + "whitespace": { + options: [ + "check-branch", + "check-decl", + "check-operator", + "check-separator", + "check-type", + "check-typecast", + "check-type-operator", + "check-rest-spread", + ], + }, }; // tslint:enable object-literal-sort-keys diff --git a/src/linter.ts b/src/linter.ts index 4dcfdd7af77..5bc559a5b53 100644 --- a/src/linter.ts +++ b/src/linter.ts @@ -43,7 +43,7 @@ import { arrayify, dedent, flatMap } from "./utils"; * Linter that can lint multiple files in consecutive runs. */ class Linter { - public static VERSION = "5.6.0"; + public static VERSION = "5.7.0"; public static findConfiguration = findConfiguration; public static findConfigurationPath = findConfigurationPath; diff --git a/src/rules/whitespaceRule.ts b/src/rules/whitespaceRule.ts index 4e50eca8894..e5ab88d61ac 100644 --- a/src/rules/whitespaceRule.ts +++ b/src/rules/whitespaceRule.ts @@ -39,7 +39,7 @@ export class Rule extends Lint.Rules.AbstractRule { description: "Enforces whitespace style conventions.", rationale: "Helps maintain a readable, consistent style in your codebase.", optionsDescription: Lint.Utils.dedent` - Nine arguments may be optionally provided: + Ten arguments may be optionally provided: * \`"check-branch"\` checks branching statements (\`if\`/\`else\`/\`for\`/\`while\`) are followed by whitespace. * \`"check-decl"\`checks that variable declarations have whitespace around the equals token.