Closed greenkeeper[bot] closed 7 years ago
Update to this version instead π
no-invalid-template-strings
(#2332)no-sparse-arrays
(#2407)no-void-expression
: adds ignore-arrow-function-shorthand
(#2445)tslint:all
configuration (#2417)no-reference-import
from jsRules
to rules
(#2441)no-unnecessary-callback-wrapper
: only check if callback is identifier, allow all other expressions (#2510)member-access
: Skip index signature, it can not have an access modifier (#2437)restrict-plus-operands
fixes regression where every assignment and comparison was checked (#2454)no-unnecessary-callback-wrapper
: allow async wrapper function (#2510)prefer-for-of
: No error if delete
is used (#2458)radix
: don't warn for missing radix on method calls (#2352)no-use-before-declare
: Handle symbol with empty declarations list. (#2436)strict-type-predicates
: Check for construct signatures in isFunction
. (#2479)strict-boolean-expressions
: When --strictNullChecks
is turned off, allow-null-union
and allow-undefined-union
turn off "always truthy" errors. (#2373)radix
: added check for global.parseInt and window.parseInt (#2352)arrow-return-shorthand
: Improve failure message when return expression is an object literal (#2466)Update to this version instead π
no-console
bans all console methods when no methods are specified (#2610)no-object-literal-type-assertion
(#2580)no-irregular-whitespace
(#2487)prefer-switch
(#2331)number-literal-format
(#2526)deprecation
(#2395)no-unnecessary-type-assertion
(#2519)interface-over-type-literal
(#2617)callable-types
(#2552)no-string-literal
(#2495)no-internal-module
(#2517)align
rule added members
option, which checks alignment of methods and properties of classes, objects, interfaces, type literals and object destructuring (#2387)align
rule added elements
option, which checks alignment of elements in array literals, array destructuring and tuple types (#2387)trailing-comma
adds more granular options to specify trailing commas for arrays, objects, functions, type literals, imports, and exports (#2538)ScopeAwareRuleWalker
and BlockScopeAwareRuleWalker
. (#2561)no-unused-expression
: allow void(0)
in addition to void 0
and void
in expression and statement position (#2645)align
: fix false positive for files with BOM (#2642)return-undefined
: Handle contextual types with ambiguous signatures; allow any
; and handle async functions. (#2576)semicolon
: don't mark semicolon as unnecessary when the next statement is on the same line (#2591)no-internal-module
: no more false positives for global augmentation (#2517)no-unnecessary-qualifier
: no longer breaks when walking a function that references arguments
(#2555)prefer-const
no longer shows warnings on ambient declarations (#2391)callable-types
: suggest correct fix for interfaces with type arguments (#2552)quotemark
: fix regression with jsx attributes (#2605)adjacent-overload-signatures
handles functions ending in semicolon (#2412)object-literal-key-quotes
: correctly stringify numbers when fixing (#2515)object-literal-key-quotes
: does no longer require quotes for property names containing digits (#2515)align
: Don't report 'statements are not aligned' for empty statements (#2653)class-name
now also checks class expressions (#2553)optionExamples
: Allow to use an options array directly instead of a string representation. (#2527)rulesDirectory
can now be resolved with Nodes resolve logic, if the directory contains an index.js
(#2163) (#2358)no-unused-expression
: narrow error location for comma separated expressions and conditional expressions (#2645)no-string-literal
now handles escaped strings (#2495)no-unnecessary-callback-wrapper
: Allow x => x(x)
(#2524)no-var-keyword
: Allow global var declarations (#2513)Thanks to our contributors!
Update to this version instead π
prefer-switch
: Change default min-cases
to 3. (#2669)outputAbsolutePaths
option (#2667)prefer-object-spread
(#2624)encoding
(#2368)prefer-conditional-expression
(#2363)indent
support indent size (#2723)object-literal-sort-keys
adds ignore-case
(#2592)quotemark
: Add avoid-template
option (#2766)await-promise
: What's considered a "Promise" is now configurable. (#2661)indent
(#2723)typedef-whitespace
(#2718)variable-name
(#2672)typedef
: Use name or parameters for error location (#2460)object-literal-sort-keys
: check shorthand properties (#2592)space-before-function-paren
: Handle get
/set
accessor (#2700)typedef-whitespace
added checks for arrow function, call and construct signature (#2718)no-object-literal-type-assertion
: Allow cast to any
(#2671)-p
option handles directories (#2756)tsconfig.json
is found next to tslint.json
(#2769)return-undefined
: Treat a return type void | undefined
same as void
(#2731)no-unnecessary-initializer
: Handle BindingElement
anywhere, not just in a VariableDeclaration
. (#2707)jsdoc-format
: correctly handle alignment in files with BOM (#2619)jsdoc-format
: don't treat empty comments (/**/
) as jsdoc (#2619)typedef-whitespace
don't warn for leading whitespace if token is preceded by line break (#2718)jsdoc-format
: fixed error position if line ends with \r\n
(#2619)prefer-switch
: add missing checks for some expressions (#2686)prefer-template
: Allow "a" + "b" + "c"
. (#2741)prefer-const
: fix false positive with variable declared outside of for-of or for-in (#2760)--project
: fix file matching with relative path to tsconfig.json
(#2688)no-default-export
: correctly handle export default abstract class {...}
(#2630)no-mergeable-namespace
: display correct line in error message (#2656)object-literal-sort-keys
: handle object spread correctly (#2592)await-promise
: Consider types derived from a Promise in union types too. (#2661)no-unsafe-any
: Fix bug where number literal in type position was flagged as an unsafe any
. (#2712)Lint.Utils.objectify
(#2764)Thanks to our contributors!
Update to this version instead π
not a directory
errorUpdate to this version instead π
--out
file (#2867)unified-signatures
: Don't suggest to unify rest parameters. (#2874)binary-expression-operand-order
: Allow if both sides of the binary expression are literals. (#2873)whitespace
, space-before-function-paren
and deprecation
(#2893)no-string-literal
: Fix documentation (#2875)Update to this version instead π
Editor's note: This release features an important bugfix for overlapping fixes when using --project
and --fix
(#2864).
completed-docs
: Add enum-members
option (#2911)no-this-reassignment
(#2931)encoding
closes files correctly (#2958)whitespace
fix whitespace "check-module"
to properly lint and fix errors (#2401) (#2825)whitespace
: now correctly handles dynamic imports introduced in typescript@2.4.0 (#2924)switch-final-break
: don't fail if break jumps to a label outside of the switch (#2914)no-shadowed-variable
: exempt this
parameter (#2598)prefer-for-of
correctly handles variable scopes and other unrelated identifiers (#2984)no-unused-variable
autofix removes whole import (#2901)-v
option (#2926)no-empty
(#2886)prefer-const
: handle destructuring in for-of loop initializer as if {"destructuring": "all"}
was specified (#2904)no-shadowed-variable
: added checks for other shadowing declarations, e.g. interfaces, classes, type parameters, imports, etc. (#2598)no-shadowed-variable
no longer fails for declarations in the same scope, e.g. var foo; var foo;
. Use the rule no-duplicate-variable
to find such errors. (#2598)Thanks to our contributors!
Update to this version instead π
no-duplicate-imports
(#3075)no-submodule-imports
(#3091)space-within-parens
(#2959)member-access
(#2969)no-null-keyword
: fix x == null
to x == undefined
(#2802)no-shadowed-variable
let's you optionally ignore certain kinds of declarations (#3030)prefer-conditional-expression
adds check-else-if
(#2963)array-type
: consider this
to be simple type (#2982)await-promise
accepts not only union types but also intersection types with Promise-like types (#2987)callable-types
: don't remove export modifier of interfaces (#2962)completed-docs
: Only checks variables at the file-level. (#2950)completed-docs
: Uses correct visibility of variables. (#2950)no-floating-promises
: recognize rejection handler passed as second argument to promise.then()
(#3048)no-shadowed-variable
don't warn for shadowed type parameter on static class members (#3030)no-shadowed-variable
fixed false positive with key name in index signature (#3030)no-shadowed-variable
fixed false positive with parameter inside function decorator (#3030)no-unsafe-any
: allow truthyness and falsyness checks (#3008)no-unused-variable
fixed crash when using destructuring (#3058)one-line
correctly handles multiline type parameters (#3004)prefer-for-of
fixed false positives when array is modified, e.g. arr[i]++
(#3044)prefer-object-spread
adds parens when fixing arrow function return (#3026)prefer-object-spread
permit functions as first argument to Object.assign (#3098)space-before-function-paren
Handle default exports of functions without names like anonymous functions (fixes #3040) (#3053)./test/parse
could not be located due after consumers had run yarn clean
(#3072)no-null-keyword
allows strict comparison (#2802)no-switch-case-fall-through
matches // falls through
comments case insensitive and allows trailing text (#2983)ordered-imports
: support importEqualsDeclaration (#3102)no-inferrable-types
(#2885)prefer-conditional-expression
: ignore if-else-if
by default. Use the new "check-else-if"
option to check nested if statements (#2963)Thanks to our contributors!
Update to this version instead π
no-parameter-reassignment
(#3045)object-literal-sort-keys
: Add match-declaration-order
option (#2829)check-type-operator
for whitespace
rule (#3083)whitespace
: Add check-rest-spread
option (#3089)AbstractRule#applyWithFunction
allows additional parameter that is passed through to walkFn
(#3140)AbstractRule#applyWithFunction
has better type checking for its type parameter (#2660)member-access
autofix now correcly inserts public
keyword after decorators (#3162)prefer-const
correctly handle catch
without binding parameter introduced in typescript@2.5.1
(#3151)no-invalid-template-strings
allows backslash-prefixed template expressions (#3116)deprecation
no longer shows errors on imports and exports (#3141)deprecation
: fix false positive when calling a function or method where another overload is deprecated (#2883)whitespace
: fixed "check-separator"
for trivial for
cases. (#3132)prefer-object-spread
prevent spreading this
as it is not allowed by the compiler (#3126)msbuild
formatter uses backslashes in paths on Windows (#3145)no-namespace
ignores global augmentation (#3161)no-submodule-imports
allows whitelisting of submodules like @angular/core/testing
(#3129)ts-node
(#3108)quotemark
no longer requires "single"
or "double"
to be the first option. The rule defaults to "double"
if none is specified. (#3114)no-unused-variable
autofix removes trailing comments of imports (#3156)no-unnecessary-type-assertion
allows certain necessary assertions to prevent type widening (#3120)Thanks to our contributors!
Version 5.0.0 of tslint just got published.
The version 5.0.0 is not covered by your current version range.
Without accepting this pull request your project will work just like it did before. There might be a bunch of new features, fixes and perf improvements that the maintainers worked on for you though.
I recommend you look into these changes and try to get onto the latest version of tslint. Given that you have a decent test suite, a passing build is a strong indicator that you can take advantage of these changes by merging the proposed change into your project. Otherwise this branch is a great starting point for you to work on the update.
Release Notes
v5.0.0msbuild
was outputting all failures as "warning".pmd
was outputting all failures as priority 1. Now, it uses priority 3 for "error" (default) and priority 4 for "warning"json
changed thefix
property to now contain either one replacement or an array of replacements (#2403)tslint:recommended
configuration updated withtslint:latest
rules & options (#2424)no-unused-new
rule, with logic moved intono-unused-expression
(#2269)no-trailing-whitespace
now checks template strings by default. Use the new optionsignore-template-strings
to restore the old behavior. (#2359)API breaks for custom rules
Removed method
skip
fromRuleWalker
(#2313)Removed all use of the TypeScript Language Service, use only Program APIs instead (#2235)
This means that some rules that previously worked without the type checker now require it. This includes:
no-unused-variable
no-use-before-declare
This breaks custom rule compilation. If your rule was not using the
ts.LanguageService
APIs, the migration is quite simple:Removed
createFix
. Replacements should be passed directly into addFailure. (#2403)Removed deprecated
scanAllTokens
andskippableTokenAwareRuleWalker
(#2370)[feature] The severity level of rules are now individually configurable. Default severity can also be configured. (#629, #345)
severity
:default
|error | warn | warning | none | off
defaultSeverity
:error | warn | warning | none | off
callable-types
outputs errors andmax-line-length
outputs warnings):[new-rule]
prefer-template
(#2243)[new-rule]
return-undefined
(#2251)[new-rule]
no-reference-import
(#2273)[new-rule]
no-unnecessary-callback-wrapper
(#2249)[new-fixer]
linebreak-style
(#2394)[new-fixer]
eofline
(#2393)Full list of changes
OptionallyTypedRule
, which allows rule authors to write a rule that applies when typing is either enabled or disabled (#2300)prefer-function-over-method
now ignores abstract methods (#2307)arrow-parens
with optionban-single-arg-parens
now correctly handles functions with return type annotation (#2265)prefer-function-over-method
exclude overload signatures (#2315)use-isnan
now applies only to comparison operators (#2317)file-header-rule
now handles single-line comments correctly (#2320)newline-before-return
: fix handling of blank lines between comments (#2321)trailing-comma
No longer enforce trailing commas in type parameters and tuple types (#2236)align
don't fix if it would remove code (#2379)unified-signatures
now recognizes rest parameters (#2342)no-inferrable-types
don't warn for inferrable type on readonly property (#2312)trailing-comma
no longer crashes on new without parentheses (e.g.new Foo
) (#2389)semicolon
Ignore comments when checking for unnecessary semicolon (#2240)semicolon
Don't report unnecessary semicolon when followed by regex literal (#2240)--force
is specified (#2322)--test
now correctly strips single quotes from patterns on windows (#2322)prefer-const
only fix initialized variables (#2219)prefer-const
correctly handle variables shadowed by parameters and catched exceptions (#2219)prefer-const
don't warn if one variable in a for loop initializer can not be const (#2219)prefer-const
handle more cases in destructuring (#2219)no-unused-expression
allow comma separated assignments (#2269)ignore-properties
option ofno-inferrable-types
now also ignores parameter properties (#2312)unified-signatures
now displays line number of the overload to unify if there are more than 2 overloads (#2270)trailing-comma
New checks for CallSignature and NamedExports (#2236)semicolon
New check for export statements, function overloads and shorthand module declaration (#2240)semicolon
Report unnecessary semicolons in classes and in statement position (for option "always" too) (#2240)semicolon
check for semicolon after method overload (#2240)array-type
now considerobject
,undefined
andnever
as simple types, allowingobject
,undefined[]
andnever[]
(#1843)(#2353)align
check statement alignment for all blocks (#2379)align
check parameter alignment for all signatures (#2379)--test
can handle multiple paths at once (#2322)only-arrow-functions
allow functions that usethis
in the body (#2229)--type-check
is used without--project
(#2322)-p
as shorthand for--project
to be consistent withtsc
(#2322)prefer-const
show warnings forvar
(#2219)quotemark
fixer unescapes original quotemark (e.g.'\''
->"'"
) (#2359)no-unused-expression
allow indirect eval(0, eval)("");
(#2269)no-unused-expression
checking for unused new can now use optionallow-fast-null-checks
(#2269)no-unused-expression
find unused comma separated expressions in all locations of the code (#2269)no-unused-expression
find unused expressions inside void expression (#2269)defaultSeverity
with optionserror
,warning
, andoff
. (#2416)no-unused-expression
adds optionallow-tagged-template
to allow tagged templates for side effects (#2269)no-unused-expression
adds optionallow-new
to allownew
without using the new object (#2269)member-access
addsno-public
option (#2247)curly
added optionignore-same-line
(#2334){destructuring: "all"}
to only warn if all variables in a destructuring can be const (#2219)ignore-template-strings
tono-trailing-whitespace
(#2359)array-type
now considerundefined
andnever
as simple types, allowingundefined[]
andnever[]
(#1843)Thanks to our contributors!
Not sure how things should work exactly?
There is a collection of [frequently asked questions](https://greenkeeper.io/faq.html) and of course you may always [ask my humans](https://github.com/greenkeeperio/greenkeeper/issues/new).Your Greenkeeper Bot :palm_tree: