Npms_big

tslint

5.8.0

An extensible static analysis linter for the TypeScript language

(cli, typescript, linter)

Critical or Security advisories for 5.8.0

This version doesn't have any advisory. Want to report one?

Changelog for 5.8.0

:warning: Deprecations

  • [deprecation] typeof-compare is deprecated because typescript already does that check (#3286)
  • [deprecation] CLI argument --type-check is no longer necessary and will be removed in the next major version (#3322)

Updates to tslint:latest configuration

+    "ban-comma-operator": true,
+    "jsdoc-format": {
+        options: "check-multiline-start",
+    },
+    "no-duplicate-switch-case": true,
+    "no-implicit-dependencies": true,
+    "no-return-await": true,

:tada: Features

  • [feature] Added linterOptions configuration field to tslint.json, which supports a list of exclude globs to disable linting for a subset of files (#2409)
  • [new-rule] no-return-await (#3233)
  • [new-rule] no-redundant-jsdoc (#2754)
  • [new-rule] no-duplicate-switch-case (#2937)
  • [new-rule] no-implicit-dependencies (#3343)
  • [new-rule] no-unnecessary-class (#3119)
  • [new-rule] ban-comma-operator (#3250)
  • [new-fixer] one-line (#3200)
  • [new-fixer] curly (#3262)
  • [new-rule-option] jsdoc-format adds option "check-multiline-start" to enforce the first line of a multiline JSDoc comment to be empty. (#3181)
  • [new-rule-option] trailing-comma adds option "esSpecCompliant" to make it compatible with the ES spec regarding trailing commas after object/array rest and rest parameters. (#3176)
  • [new-rule-option] "check-parameter-property" option for member-access rule (#3325)
  • [new-rule-option] "strict-bound-class-methods" option for semicolon rule (#3294)
  • [new-rule-option] "grouped-imports" option for ordered-imports rule (#3138)
  • [new-rule-option] "ignore-blank-lines" option for no-trailing-whitespace rule (#3346)
  • [new-rule-option] "never" option for object-literal-shorthand disallows shorthand notation (#3268)
  • [new-rule-option] "exclude-class-expressions" option for max-classes-per-file rule (#3281)
  • [new-rule-option] no-unnecessary-type-assertion supports a whitelist of types to ignore (#3257)
  • [new-rule-option] "module-source-path" for ordered-imports allows sorting imports by trailing end of path (#3178)
  • [new-formatter] JUnit (#3194)

:hammer_and_wrench: Bugfixes & enhancements

  • [bugfix] no-empty-interface allows providing type arguments for extended type (#3260)
  • [bugfix] Fixed line switches to not disable failures in the next line following the disabled line (#3177)
  • [bugfix] return-undefined handles union return types in async functions (#3298)
  • [bugfix] deprecation checks correct constructor overload (#3203)
  • [bugfix] return-undefined declared return type takes precedence over contextual type (#3298)
  • [bugfix] Correctly mark inputFilePath as an optional parameter in Configuration.findConfiguration() (#3195)
  • [bugfix] return-undefined fixed regressions: once again allows anything if return type is any (#3298)
  • [bugfix] only-arrow-functions allow function if this is used in parameter initializer (#3315)
  • [bugfix] no-conditional-assignment: exclude intentional assignments, e.g. inside functions (#2629)
  • [bugfix] no-angle-bracket-type-assertion fixer adds parentheses when necessary (#3301)
  • [bugfix] no-angle-bracket-type-assertion fixed order when autofixing consecutive assertions (#3301)
  • [bugfix] vso formatter no longer duplicates output for fixed failures (#3348)
  • [bugfix] no-unbound-method: Allow negation of method (#3349)
  • [bugfix] arrow-parens with option "ban-single-arg-parens" no longer produces invalid code when fixed (#3247)
  • [bugfix] Fixed regression where the lookup of tslint.json stopped at the current directory. (#3309)
  • [bugfix] --test works correctly with any compilerOptions.target (#3296)
  • [bugfix] whitepace handles files with BOM and other irregular whitespace (#3305)
  • [bugfix] callable-types auto fix produces invalid results (#3342)
  • [bugfix] no-string-literal correctly fix property names with leading underscores (#3184)
  • [bugfix] variable-name fixed crash on empty variable name (#3292)
  • [bugfix] trailing-comma fixed crash on arrow function without parens (#3246)
  • [bugfix] Fix space-before-function-paren for anonymous/arrow generic functions (#3085)
  • [bugfix] Removed warning printed to console when using the no-unused-variable along with the noUnusedLocals and noUnusedParameters compiler options (#3227)
  • [bugfix] no-invalid-this ignores functions with a this param (#3267)
  • [enhancement] Sort failures by line and character for formatters (#3345)
  • [enhancement] import-blacklist also checks exports and dynamic imports (#3258)
  • [enhancement] no-conditional-assignment added check for conditional (ternary) expressions (#2629)
  • [enhancement] Allow completed-docs to list doc tags that mark a node as not requiring a documentation body. Tags can also provide a regexp matcher to validate that their contents are docs-valid. (#2415)
  • [enhancement] await-promise enforces that for-await-of is only used with AsyncIterable (#3297)
  • [enhancement] one-line checks type alias declarations (#3200)
  • [enhancement] deprecation checks object destructuring (#3318)
  • [enhancement] no-submodule-imports also checks exports (#3258)
  • [enhancement] restrict-plus-operands: More specific error message when arguments include strings (#3220)
  • [enhancement] no-unsafe-any checks more expressions, for example destructuring, yield, property initializer (#3196)
  • [enhancement] object-literal-sort-keys: allow grouping of object properties via additional blank lines when using alphabetical ordering. (#3191)
  • [enhancement] Migrated CLI from using colors module to chalk module (#3171)
  • [enhancement] no-unused-variable applies the ignorePattern to imports (#3187)

Thanks to our contributors!

  • Klaus Meinhardt
  • Charles Samborski
  • Donald Pipowitch
  • Josh Goldberg
  • mmkal
  • Erik
  • Csaba Miklos
  • Dominik Moritz
  • Khalid Saifullah
  • Lukas Spieß
  • Merott Movahedi
  • Bowen Ni
  • ksvitkovsky
  • Hutson Betts
  • Caleb Eggensperger
  • Brent Erickson
  • Trivikram
  • Brandon Furtwangler
  • Pavel Zet
  • aervin_
  • Holger Jeromin
  • Danny Guo
  • Jeremy Morton
  • Cyril Gandon
  • Andy Hanson
  • yadan

Dependencies for 5.8.0

Name Requirement Status
^6.20.0

^3.5.0

^0.4.31

^2.9.0

^3.2.0

^5.0.30

^3.5.31

^2.0.29

^2.2.35

^7.0.29

Display all

My projects using tslint

Name Locked version Requirement
You should be logged in to see which of your projects use tslint.