Update tslint to the latest version 🚀 #542
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Version 5.9.0 of tslint was just published.
The version 5.9.0 is not covered by your current version range.
If you don’t accept this pull request, your project will work just like it did before. However, you might be missing out on a bunch of new features, fixes and/or performance improvements from the dependency update.
It might be worth looking into these changes and trying to get this project onto the latest version of tslint.
If you have a solid test suite and good coverage, a passing build is a strong indicator that you can take advantage of these changes directly by merging the proposed change into your project. If the build fails or you don’t have such unconditional trust in your tests, this branch is a great starting point for you to work on the update.
Release Notes
v5.9.0src/language/utils.ts
have been deprecated (#3476)Configuration inheritance changes
Significant changes have been made to configuration inheritance to address a long-standing UX issue around
defualtSeverity
: #2569.defaultSeverity
defined in atslint.json
file will now override thedefaultSeverity
value defined in any configurations you are extending.This means that any rules specified in the base configurations can now take on a new
defaultSeverity
if you so choose. If you extend multipleconfiguration files, the
defaultSeverity
defined in the last one wins.In practice, this allows users to, for example, more easily use the built-in TSLint configurations (
tslint:recommended
,tslint:latest
,tslint:all
)and treat all errors as warnings instead of errors.
For more details, see the relevant PRs:
defaultSeverity
defined in extended configs (#3449)🎉 Features
file-header
(#3475)no-dynamic-delete
(#3573)prefer-readonly
(#2896)newline-per-chained-call
(#3278)"temporalDeadZone"
forno-shadowed-variable
to ignore shadowing in the temporal dead zone of classes, parameters, enums and variables declared withlet
orconst
(#3389)
"shorthand-first"
forobject-literal-sort-key
(#3607)max-line-length
(#3099)🛠 Bugfixes & enhancements
--project
excludes all files of external dependencies (#3320)tsconfig.json
is invalid (#3410)no-implicit-dependencies
don't crash on malformed package.json (#3373)strict-type-predicates
allows comparing typeof result with non-literals (#3542)no-redundant-jsdoc
fixed crash on unhandled tag (#3414)object-literal-sort-keys
fixed regression that effectively disabled the rule with\r\n
line breaks (#3427)curly
fixer now correctly handles comments (#3473)no-unsafe-any
fixed false-positive with namespaced types (#3487)no-any
(#3486)no-unnecessary-type-assertion
fixed false negatives for types with numeric keys (#3468)callable-types
adds parentheses when fixing a type literal inside an array type (#3440)no-unsafe-any
allows spreading anany
value into an object (#3439)arrow-parens
fixer (#3618)prefer-const
false negative with index signature named like a variable (#3385)whitespace
rule checks property declarations if"check-decl"
is enabled (#3546)no-duplicate-super
rule. (#3544)no-shadowed-variable
now excludes declaration files and ambient modules (#3387)no-duplicate-imports
Allow duplicate imports from separate ambient module declarations (#3398)await-promise
correctly recognises classes extending Promise (#3383)prefer-conditional-expression
: don't repeat error on nested if statements (#3528)completed-docs
: don't require documentation on methods in object literals (#3532)one-line
fixed crash on syntax error in class or interface (#3538)no-redundant-jsdoc
allow@template
tag if it has a description (#3415)typeof-compare
(#3429)"properties"
option forcompleted-docs
rule now checks getter and setter accessors. (#3497)no-magic-numbers
ignores parseInt radix parameter (#3536)--project
option (#3313)stylish
-formatter's output jumps to the first failure in that file. (#3491)ban-comma-operator
ignores comma operator inside for-loop incrementor (#3485)space-within-parens
updated to always allow empty parentheses()
. (#3513)completed-docs
modifier lists (#3379)ban-comma-operator
(#3384)completed-docs
rule to use a function instead of a walker (#3466)ban-comma-operator
: fix metadata, list as "functionality" rule (#3612)no-use-before-declare
documentation to clarify the rule's status (#3520)await-promise
options documentation (#3519)hasFix
metadata for theindent
rule (#3529)no-irregular-whitespace
(#3627)Thanks to our contributors!
FAQ and help
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper bot 🌴