From 544393fc530fd184dd41a2cba2f9566d9b21cf08 Mon Sep 17 00:00:00 2001 From: Noah Chen Date: Mon, 22 May 2017 17:45:45 -0400 Subject: [PATCH] Prepare for v5.3 (#2779) --- CHANGELOG.md | 58 +++++++++++++++++++++++++++++++++++++++++++ package.json | 2 +- src/configs/latest.ts | 1 + src/linter.ts | 2 +- 4 files changed, 61 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f16c5f4214c..32a0249d6f7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,64 @@ Change Log === + + +v5.3.0 +--- + +## This change may require a change to tslint.json +- [enhancement] [`prefer-switch`](https://palantir.github.io/tslint/rules/prefer-switch/): Change default `min-cases` to 3. (#2669) + +## :tada: Notable features & enhancements +- [new-cli-option] cli: Add `outputAbsolutePaths` option (#2667) +- [new-rule] [`prefer-object-spread`](https://palantir.github.io/tslint/rules/prefer-object-spread/) (#2624) +- [new-rule] [`encoding`](https://palantir.github.io/tslint/rules/encoding/) (#2368) +- [new-rule] [`prefer-conditional-expression`](https://palantir.github.io/tslint/rules/prefer-conditional-expression/) (#2363) +- [new-rule-option] [`indent`](https://palantir.github.io/tslint/rules/indent/) support indent size (#2723) +- [new-rule-option] [`object-literal-sort-keys`](https://palantir.github.io/tslint/rules/object-literal-sort-keys/) adds `ignore-case` (#2592) +- [new-rule-option] [`quotemark`](https://palantir.github.io/tslint/rules/quotemark/): Add `avoid-template` option (#2766) +- [new-rule-option] [`await-promise`](https://palantir.github.io/tslint/rules/await-promise): What's considered a "Promise" is now configurable. (#2661) +- [new-fixer] [`indent`](https://palantir.github.io/tslint/rules/indent/) (#2723) +- [new-fixer] [`typedef-whitespace`](https://palantir.github.io/tslint/rules/typedef-whitespace/) (#2718) +- [enhancement] better error messages in [`variable-name`](https://palantir.github.io/tslint/rules/variable-name/) (#2672) +- [enhancement] [`typedef`](https://palantir.github.io/tslint/rules/typedef/): Use name or parameters for error location (#2460) +- [enhancement] [`object-literal-sort-keys`](https://palantir.github.io/tslint/rules/object-literal-sort-keys/): check shorthand properties (#2592) +- [enhancement] [`space-before-function-paren`](https://palantir.github.io/tslint/rules/space-before-function-paren/): Handle `get`/`set` accessor (#2700) +- [enhancement] [`typedef-whitespace`](https://palantir.github.io/tslint/rules/typedef-whitespace/) added checks for arrow function, call and construct signature (#2718) +- [enhancement] [`no-object-literal-type-assertion`](https://palantir.github.io/tslint/rules/no-object-literal-type-assertion/): Allow cast to `any` (#2671) +- [enhancement] cli: `-p` option handles directories (#2756) +- [develop] testing rules with type information is enabled when a `tsconfig.json` is found next to `tslint.json` (#2769) +- [configuration] deprecate mixed case tslint.json (#2713) +- [bugfix] [`return-undefined`](https://palantir.github.io/tslint/rules/return-undefined/): Treat a return type `void | undefined` same as `void` (#2731) +- [bugfix] [`no-unnecessary-initializer`](https://palantir.github.io/tslint/rules/no-unnecessary-initializer/): Handle `BindingElement` anywhere, not just in a `VariableDeclaration`. (#2707) +- [bugfix] [`jsdoc-format`](https://palantir.github.io/tslint/rules/jsdoc-format/): correctly handle alignment in files with BOM (#2619) +- [bugfix] [`jsdoc-format`](https://palantir.github.io/tslint/rules/jsdoc-format/): don't treat empty comments (`/**/`) as jsdoc (#2619) +- [bugfix] [`typedef-whitespace`](https://palantir.github.io/tslint/rules/typedef-whitespace/) don't warn for leading whitespace if token is preceded by line break (#2718) +- [bugfix] Make "completed-docs" rule respect "public" privacy (or lack thereof) (#2749) +- [bugfix] [`jsdoc-format`](https://palantir.github.io/tslint/rules/jsdoc-format/): fixed error position if line ends with `\r\n` (#2619) +- [bugfix] [`prefer-switch`](https://palantir.github.io/tslint/rules/prefer-switch/): add missing checks for some expressions (#2686) +- [bugfix] [`prefer-template`](https://palantir.github.io/tslint/rules/prefer-template/): Allow `"a" + "b" + "c"`. (#2741) +- [bugfix] [`prefer-const`](https://palantir.github.io/tslint/rules/prefer-const/): fix false positive with variable declared outside of for-of or for-in (#2760) +- [bugfix] `--project`: fix file matching with relative path to `tsconfig.json` (#2688) +- [bugfix] [`no-default-export`](https://palantir.github.io/tslint/rules/no-default-export/): correctly handle `export default abstract class {...}` (#2630) +- [bugfix] [`no-mergeable-namespace`](https://palantir.github.io/tslint/rules/no-mergeable-namespace/): display correct line in error message (#2656) +- [bugfix] [`object-literal-sort-keys`](https://palantir.github.io/tslint/rules/object-literal-sort-keys/): handle object spread correctly (#2592) +- [bugfix] Consistently output absolute/relative paths (#2667) +- [bugfix] [`await-promise`](https://palantir.github.io/tslint/rules/await-promise): Consider types derived from a Promise in union types too. (#2661) +- [bugfix] [`no-unsafe-any`](https://palantir.github.io/tslint/rules/no-unsafe-any/): Fix bug where number literal in type position was flagged as an unsafe `any`. (#2712) +- [api] Deprecate `Lint.Utils.objectify` (#2764) + +Thanks to our contributors! +- Andy Hanson +- Klaus Meinhardt +- Martin Probst +- Filipe Silva +- walkerburgin +- René Scheibe + v5.2.0 --- diff --git a/package.json b/package.json index e3d427e8cf1..6a808f284e7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tslint", - "version": "5.2.0", + "version": "5.3.0", "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 eeec4f75909..17072516afb 100644 --- a/src/configs/latest.ts +++ b/src/configs/latest.ts @@ -33,6 +33,7 @@ export const rules = { "no-object-literal-type-assertion": true, // added in v5.3 + "prefer-conditional-expression": true, "prefer-object-spread": true, }; // tslint:enable object-literal-sort-keys diff --git a/src/linter.ts b/src/linter.ts index 4fabd6acbfd..8bb73806e06 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.2.0"; + public static VERSION = "5.3.0"; public static findConfiguration = findConfiguration; public static findConfigurationPath = findConfigurationPath;