This repository has been archived by the owner on Nov 10, 2023. It is now read-only.
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.
This Pull Request updates dependency tslint from version
4.5.1
to5.0.0
Changelog
5.0.0 / 2017-03-29
Fixes #2405
Fixes #2329
Fixes #2404
Closes #2364
Refactored some of the rather simple rules to WalkContext or AbstractWalker.
no-trailing-whitespace is the only rule where the logic changes: now it looks for trailing whitespace in the source text and iff there are lines found, it searches the AST for template spans and comments.
[rule-change] no-trailing-whitespace now checks template strings by default. Use the new options ignore-template-strings to restore the old behavior.
[new-rule-option] added ignore-template-strings to no-trailing-whitespace
[enhancement] fixer of quotemark unescapes original quotemark (e.g. ''' -> "'")
Linebreak style is determined by the first line break in the file. If there is only one line, there will be no fix. Fixes: #2186. Also reorganized the test files.
[new-fixer] `eofline`
[bugfix] `trailing-comma` no longer crashes on new without parentheses (e.g. `new Foo`)
[new-rule-option] "allow-snake-case" option for `variable-name` rule
Fixes: #2330
[no-log]
Forgot to handle initialized parameters of constructors.
[enhancement] show warnings for `var`
[bugfix] correctly handle variables shadowed by parameters and catched exceptions
[bugfix] don't warn if a variable in a for loop initializer can be const
[bugfix] handle more cases in destructuring
[bugfix] only fix initialized variables
[new-rule-option] `{destructuring: "all"}` to only warn if all variables in a destructuring can be const
[bugfix] exit with 0 on type check errors when `--force` is specified
Fixes: #2087
[bugfix] `--test` now correctly strips single quotes from patterns on windows
[enhancement] `--test` can handle multiple paths at once
[enhancement] added `-p` as shorthand for `--project` to be consistent with `tsc`
Kind of fixes: #2291
[enhancement] print error when `--type-check` is used without `--project`
[enhancement] don't print stack trace on type check error
Simplify ASI checks for TypeAlias, import, export and debugger
Simplify checks for semicolon
[bugfix] Ignore comments when checking for unnecessary semicolon
[bugfix] Don't report unnecessary semicolon when followed by regex literal
[enhancement] New check for export statements
[enhancement] Report unnecessary semicolons in classes and in statement position (for option "always"
too)
[enhancement] check for semicolon after method overload
[enhancement] check for semicolon in type literals. To restore the old behaviour use the new options `ignore-type-literals`
[new-rule-option] `ignore-type-literals` added to `semicolon`
[bugfix] don't warn for inferrable type on readonly property
Fixes: #2306
[enhancement] `ignore-properties` option of `no-inferrable-types` now also ignores parameter properties
Integrate `no-unused-new` into this rule.
[new-rule-option] `allow-new-side-effects` restores the old behaviour to allow `new` for side effects
[bugfix] allow comma separated assignments
Fixes: #2058
[bugfix] allow indirect eval: `(0, eval)("");`
[enhancement] checking for unused new can now use option `allow-fast-null-checks`
Fixes: #1839
[enhancement] find unused comma separated expressions in all locations of the code
[enhancement] find unused expressions inside void expression
[bugfix] exclude overload signatures from `prefer-function-over-method`
This would have also fixed #2305
Refactor the rule to use AbstractWalker and simplify the algorithm.
Abstract methods have no body, and never use `this`, so the `prefer-function-over-method` rule should not apply to them.
[bugfix] `arrow-parens` with option `ban-single-arg-parens` now correctly handles functions with return type annotation
Fixes: #2237