129 KiB
Change Log
v6.1.0
- [enhancement] Upgrade to TypeScript 3.8, support new syntax (#4915)
- [docs]
no-object-literal-type-assertionfix typo in rule description (#4911)
Thanks to our contributors!
- Daniel Zwelling
- Ryan Delaney
v6.0.0
This version has been marked as deprecated on NPM to encourage users to migrate to ESLint.
- [bugfix] fix
enforce-trailing-newlineoption infile-headerrule (#4890) - [bugfix] avoid writing to temp files with
writeFileSyncon macOS 10.15 (#4887) - [bugfix] fix crash in
completed-docsrule when tag contents are undefined (#4895) - [docs] fix example code of Radix rule (#4892)
- [docs] Add missing colon after
[error]in testing rules documentation (#4903)
Thanks to our contributors!
- Ivan Sorokin
- Tanmoy Bhowmik
- Meng Wang
- Jay Bhagat
- Aman Sharma
- Josh Goldberg
v6.0.0-beta1
No changes from v6.0.0-beta0, just re-released to correctly mark with the beta and next dist-tags on NPM.
v6.0.0-beta0
- 🔥 BREAKING CHANGES 🔥
- [api] Changed default formatter to stylish (#4872)
- [enhancement] Removed formatting and whitespace rules from
tslint:recommendedconfiguration (#4871) - [enhancement] Removed pedantic rules from
tslint:recommendedconfiguration (#4312) - [enhancement]
vsoformatter now reports severity of rule failures (#4286) - [enhancement]
typedefrulearrow-call-signatureoption is more consistent in reporting errors on lambdas and will flag more violations that were missed in the previous rule implementation (#4533) - [bugfix]
ordered-importsis now consistent with TypeScript's Organise Imports ordering (#4064) - [bugfix]
member-orderingnow checks property accessors (getters and setters) (#3984)
- Other changes
- [bugfix] Removed deprecated rules from
tslint:allconfiguration (#4862) - [bugfix] Preserve significant zeros in fixer for number-literal-format (#4856)
- [bugfix]
no-redundant-jsdocallow@authortag (#4854) - [bugfix]
RuleFailure#toJson()no longer forces rule severity to be an uppercase string (#2622) - [bugfixfix]
return-undefinedrule now works with TS 3.7 (#4866) - [enhancement]
prefer-switchis more lenient withifstatements containing multiple OR conditions without anyelseclause (#4873) - [enhancement]
completed-doc: add support for constructor documentation (#4861) - [new-rule-option]
case-insensitive-legacyforordered-importsrule (#4064) - [docs]
import-blacklist: add some options examples (#4858) - [docs] Update custom rule example to use recursive walker (#4883)
- [bugfix] Removed deprecated rules from
Thanks to our contributors!
- J Rob Gant
- Tanmoy Bhowmik
- 谭九鼎
- Ahmed Ghoneim
- Josh Goldberg
- Andrew Boyton
- Peter Sandor
- Vincent Langlet
- Adrian Leonhard
- Philipp Foedermayr
- Brian Olore
- andrew bernard
- joon1030
v5.20.1
No changes from v5.20.0, just re-released to correctly mark with the latest dist-tag on NPM.
v5.20.0
- [bugfix] fix
strict-boolean-expressionsfalse positive with"ignore-rhs"option (#4833) - [bugfix] fix
no-unnecessary-type-assertionno error when"strict": truein compiler flags (#4841) - [bugfix] "ignore" option for
file-name-casingrule works correctly (#4848) - [bugfix] fix
array-typefalse positive for simple parenthesized types with "array-simple" option (#4844) - [new-rule-option]
object-literal-shorthandsupports{"property"?: "never", "method"?: "never"}as config options (#4842) - [new-rule-option]:
allow-genericsoption forinvalid-voidrule (#4839) - [new-rule-option]
check-super-callsoption forunnecessary-constructorrule (#4813) - [chore] Upgrade
diffdependency to v4.0.1 (#4845, #4852)
Thanks to our contributors!
- Bas Bosman
- Tanmoy Bhowmik
- David Zulaica
- Maxime Kjaer
- @guidsdo
- Pavel Birukov
- Josh Goldberg
- Akshaya Srivatsa
v5.19.0
- [bugfix] relax
promise-function-asyncfor short parenthesized arrow functions (#4765) - [bugfix] fix
no-async-without-awaitfalse positive for abstract methods (#4782) - [bugfix] fix
strict-comparisonsfalse positive fornullandundefinedliterals (#4786) - [bugfix] improve
no-angle-bracket-type-assertionautofix semantics with more parentheses (#4823) - [enhancement] add BigInt support to
restrict-plus-operandsrule (#4814) - [enhancement]
await-promisenow supports new TypeScript 3.6 AST API symbols for async iterators (#4800) - [new-rule-option]
check-stringsandcheck-regexoptions formax-line-lengthrule (#4798) - [new-rule-option]
variable-declaration-ignore-functionoption fortypedefrule (#4769) - [new-rule-option]
ignore-blank-linesoption forobject-literal-sort-keysrule (#4808) - [new-rule]
no-for-in(#4747) - [new-rule]
invalid-void(#4736) - [new-rule]
strict-string-expressionsreports errors on type coercions found in string expressions (#4807) - [new-rule]
no-promise-as-boolean(#4790) - [docs] link to OSS fellowship medium post in README (#4821)
Thanks to our contributors!
- Josh Pike
- Tanmoy Bhowmik
- Michael Withagen
- Evgeniy Timokhov
- Vitalij Krotov
- Josh Goldberg
- Veda
- Guido
- Robert Fink
- Max Sysoev
v5.18.0
- [feature] New
--print-configCLI flag (#4744) - [bugfix]
no-unnecessary-type-assertionno longer flagsx!non-null assertions if--strictNullChecksis not enabled (#3724) - [bugfix]
quotemarkhandles unbalanced quotes more gracefully without crashing (#4344) - [docs] Add tslint-playground link to README and bug report template (#4150)
- [enhancement]
no-magic-numbersrule ignores arguments passed into default Number methods (#3668) - [new-fixer]
comment-format(#3583) - [new-rule-option]
"allow-trailing-lowercase"option forcomment-formatrule (#3583) - [new-rule-option]
"ignore-accessors"foradjacent-overload-signaturesto ignore getters / setters overloads (#3718) - [new-rule]
no-async-without-await(#3945) - [new-rule]
strict-comparisons(#4519)
Thanks to our contributors!
- Josh Goldberg
- smoehrle
- Mateusz Witkowski
- Andy Hanson
- John Wiseheart
- Eran Shabi
- Tibor Blenessy
- AndreasGassmann
- Ryan Waskiewicz
- Isabelle
v5.17.0
- [bugfix]
quotemarkbacktic option now ignores enum members, use strict declarations, lookup types, and strings containing octal escape sequences. (#4693) - [bugfix]
no-redundant-jsdocno longer errors onJSDocThisTag(#4690) - [chore] Update devDependency mocha from v3.2.0 to v6.1.4 (#4669) (#4674)
- [chore] Update devDependency js-yaml from ^3.13.0 to ^3.13.1 (#4663)
- [chore] Update deprecated devDependency github to @octokit/rest (#4673)
- [chore] Update devDependency nyc from v13.3.0 to v14.1.1 (#4699)
- [deprecation]
no-use-before-declarerule for typescript >= 2.9.0 (#4695) - [documentation] Minor fix for
variable-namerule metadata (#4731) - [documentation] Fixed
no-unused-variableargument count (#4683) - [enhancement] Allow const assertions in
no-object-literal-type-assertion(#4681) - [new-fixer]
unnecessary-constructor(#4694)
Thanks to our contributors!
- Bjorn Stromberg
- Vitaliy Agoshkov
- knafteN
- Bowen Ni
- Waseem Ahmad
- Åsmund Grammeltvedt
- Eric Ferreira
- Zhen Tian
- Tom Lakesman
- zachkirsch
v5.16.0
- [bugfix] Excuse more
quotemarkbacktick edge cases and fix behavior for TS < 2.7.1 (#4642) - [bugfix] Fix regression in
interface-namerule related to numeric characters in interface names (#4655, #4626) - [enhancement] Update
nycfrom v10.2.0 to v13.3.0 (#4633) - [enhancement] Migrate from deprecated babel-code-frame package to new @babel/code-frame package (#4632)
- [enhancement] Improve error message for
restrict-plus-operandsrule. (#4635) - [enhancement]
comment-formatrule now whitelists//regioncomments generated by JetBrains IDE (#4609) - [enhancement] Relax
no-null-undefined-unionrule. (#4625) - [new-rule-option]
allow-else-ifoption forunnecessary-elserule (#4599) - [documentation] Fix "identifer" typo in custom rules docs (#4657)
- [documentation] Fix code example for
switch-defaultrule (#4650) - [documentation] Fix documentation example for prose formatter (#4656)
- [documentation]
no-parameter-properties: fix unclear rule description (#4629) - [documentation] Fix typo in rule docs generation (#4638)
Thanks to our contributors!
- Oleg Artene
- William Neely
- Bjorn Stromberg
- Matthew Barry
- Neha Rathi
- Vincent Langlet
- rarenal
- Greg Jednaszewski
- Adam Postma
- Eric Ferreira
- Evgeniy Timokhov
- Martin Probst
v5.15.0
- [api]
WalkContextandAbstractWalkertype parameter defaults tovoid(#2600) - [bugfix]
no-void-expressionnow allows conditional expressions (#4606) - [bugfix] fix linebreak handling in
ordered-imports(#4583) - [bugfix] fix
static-thisfalse positive for higher order components (#4580) - [bugfix] Fixed crash in
unnecessary-elsefrom blankifstatements (#4603) - [bugfix] Fixed false positive in
unnecessary-elseafter non-jumping statement (#4603) - [bugfix]
interface-namenow handles interface starting with "I18n" correctly (#4486) - [bugfix]
no-string-throwfix inserts whitespace if not present afterthrowkeyword (#4540) - [bugfix]
quotemark: fix some edge cases forbacktickoption (#4618) - [bugfix]
unnecessary-constructor: don't flag non-private constructors that are actually necessary (#4619) - [enhancement] Upgrade js-yaml to avoid security issue (#4595)
- [new-rule-option]
allow-single-line-commentsoption forfile-headerrule (#4560) - [new-rule-option]
ignore-rest-argsoption forno-anyrule (#4581) - [new-rule]
no-null-undefined-union(#4589)
Thanks to our contributors!
- Max Belsky
- Steve Moser
- Christian Flach
- Roman Rogowski
- Terry
- Luke
- Andy Hanson
- Vitalij Krotov
- Josh Goldberg
- Vincent Langlet
- Neha Rathi
- Eric Ferreira
v5.14.0
- [bugfix]
backtickoption forquotemarkrule no longer incorrectly flags string literals that must use single/double quotes (#4535) - [bugfix] Fixed regression in CheckstyleFormatter backwards compatibility (#4561)
- [bugfix]
whitespacerule now lints export statements (#4554) - [bugfix]
no-trailing-whitespaceno longer flags files starting with a byte order mark (#4543) - [enhancement]
promise-function-asyncnow allows single statement lamda functions that delegate to another promise-returning function (#4553) - [enhancement] Add note to docs about zero-indexing for machine formatters (#4544)
- [enhancement] Fix metadata of the
whitespacerule (#4551) - [enhancement] Add junit output for files which are successfully linted (#4566)
- [new-rule-option]
underscoreoption forno-shadowed-variablerule to ignore shadowed underscores (#4546) - [new-rule-option]
require-const-for-all-capsoption forvariable-namerule (#2936) - [new-rule-option]
overloadsoption forcompleted-docsrule to enforce documentation of each overload signature (#4563) - [new-rule-option]
allow-namespace-importsoption forno-duplicate-importsrule (#4524) - [new-rule-option]
allow-argumentsoption forno-object-literal-type-assertionrule to allow type assertions on object literals used inside call expressions (#4521) - [new-rule-option]
allow-deleteoption forno-unbound-methodrule (#4548) - [new-rule]
no-tautology-expression(#4470) - [new-rule]
static-this(#4475) - [new-rule]
unnecessary-else(#4502)
Thanks to our contributors!
- Roman Rogowski
- Max Belsky
- Edward Drapkin
- Dominik Palo
- Matthew McCune
- Debsmita
- Lucas Charles
- Piotr Gajowniczek
- Darren Anderson
- Noam Yogev
- Josh Goldberg
- Karol Majewski
v5.13.1
- [bugfix] Fix regression in CheckstyleFormatter backwards compatibility (#4561)
v5.13.0
- [deprecation] Mark
RuleWalkerandProgramAwareRuleWalkeras deprecated (#4413) - [bugfix] Create output directory when the output path (specified by
--outCLI flag) does not exist. (#4507) - [bugfix] Explicit disabling of rules is now copied over to jsRules when using
jsRules: true(#4517) - [bugfix]
unknownis recognized as simple type inarray-type(#4433) - [bugfix]
ban: Fix a false positive which would occur when banning method calls nested inside objects. Previously, banning["a", "b", "c"]would trigger lint failures on the syntaxb.c(), which was not the intent of this rule. (#4383) - [bugfix] Fixed single-line comment parsing for completed-docs (#3557)
- [bugfix]
trailing-commano longer crashes if it cannot find the closing parenthesis of a function declaration (#4457) - [bugfix]
no-unsafe-any: allow implicitly downcastinganytounknown(#4442) - [bugfix] Add
grouped-importstotslint:all(#4420) - [docs] Fix docs typo (#4395)
- [enhancement] Add "formatting" rule category (#2832)
- [enhancement]
ordered-importsnow supports a groups option to provide custom grouping rules. (#4134) - [enhancement] Convert
completed-docsto an untyped rule (#3557) - [enhancement] Checkstyle formatter includes every file linted regardless of lint errors. (#3838)
- [enhancement] Formatters now receive the full list of of linted file paths as a third argument. (#3838)
- [enhancement]
array-typerule handles Typescript 3.0's unknown type properly (#4219) - [enhancement]
import-blacklistnow supports regular expression patterns for blacklisting (#3504) - [new-rule]
no-restricted-globals(#3824) - [new-fixer] added fixer for
newline-before-returnrule (#4482) - [new-fixer]
number-literal-formatnow includes auto fix (#4496) - [new-rule-option] Added
whitelistoption tono-unbound-method(#4472) - [new-rule-option] Added
jsx-ignoreoption tono-magic-numbersrule (#4460) - [new-rule-option]:
object-literal-sort-keys: Addmatch-declaration-order-onlyoption (#3748) - [new-rule-option]
strict-boolean-expressionsacceptsignore-rhsoption to disable checking the right-hand side of the&&and||operators as strictly boolean. (#4159)
Thanks to our contributors!
- Enes SOYLU
- jbsingh
- Sven Efftinge
- James C. Davis
- Norio Suzuki
- Thomas den Hollander
- Retsam
- Dobes Vandermeer
- Young Min Kim
- Grant Wu
- Felix Schindler
- Lydia
- Adrian Leonhard
- James Jensen
- Athene Noctua
- Allen
- Vincent Langlet
- Paul Medynski
- Liz
- Piotr Gajowniczek
- Max Sysoev
- Jakub Beneš
- Ian Mobley
- 周昊宇
- Nazanin Delam
- Matt R. Wilson
- Andy Hanson
- Zen
- Josh Goldberg
- Jeff Lau
v5.12.1
🛠️ Bugfixes & enhancements
- [bugfix] Revert breaking change to tslint:recommended, update tslint:latest (#4404)
- [bugfix] Correcting fixer for the
increment-decrementrule (#4415) - [bugfix] Fix
strict-type-predicateswithunknown(#4444) - [bugfix] Skip linting of
.jsonfiles to avoid problems with--resolveJsonModulecompiler option (#4001) - [bugfix] fix some
quotemarkissues when using backticks with theavoid-templateoption (#4408) - [enhancement] Mention file names in test script parse failures (#4397)
Thanks to our contributors!
- Young Min Kim
- Enes SOYLU
- Thomas den Hollander
- Adrian Leonhard
v5.12.0
🎉 Features
- [feature] Configure format from file (#4155)
- [feature] Make cli expect array for rules dir (#3788)
- [feature] Set js rules to all valid active rules (#3641)
- [improvement] Add tests for typescript@2.9 and typescript@3.0 (#4053)
- [new-fixer]
type-literal-delimiter(#3964) - [new-rule-option]
whitespaceAdd whitespace rule for open braces (#4068) - [new-rule-option]
file-name-casing: Add file name whitelist (#4206) - [new-rule-option]
object-literal-sort-keys:locale-compare(#4193) - [new-rule-option]
strict-boolean-expressionsaddsallow-enumto allow using enums in boolean expressions (#3604) - [new-rule-option]
import-blacklist: support blacklisting specific named exports (#3926) - [new-rule-option]
type-literal-delimiter: Add{ singleLine: "always" | "never"}(#3964) - [new-rule-option]
file-name-casing: Addsnake-caseoption (#4081) - [new-rule-option]
file-header: Enforce Blank Line after File Header (#3740) - [new-rule]
ban-ts-ignore(#3728) - [new-rule]
function-constructor(#4198) - [new-rule]
increment-decrement(#3575) - [new-rule]
no-default-import(#4023) - [new-rule]
unnecessary-constructor(#3647) - [new-rule]
comment-type(#4008) - [new-rule]
unnecessary-bind(#3588)
🛠️ Bugfixes & enhancements
- [api] Allow
excludeto work with node API (#4143) - [api] Upgrade TSLint to support TS 3.1 (#4274)
- [bugfix] Allow whitelisted modules to start with
@symbol (#4192) - [bugfix] Added exception for generators in
return-undefinedrule (#4370) - [bugfix] Allow unknown in 'no-object-literal-type-assertion' rule. (#4362)
- [bugfix] Completed docs rule can check single-line comments (#3841)
- [bugfix]
prefer-method-signature: Correct the auto-fix code of rule, now capable to handle multiline signature. (#4066) - [bugfix] Default logger.error should log to stderr. (#3982)
- [bugfix] Fixes an issue where TSLint doesn't correctly resolve packages in a
node_modulesfolder that are symlinked to another location where their dependencies are satisfied. (#4295) - [bugfix] Fix configuration tests when comparing rules (#4346)
- [bugfix] Fix semicolon: Cannot read property 'initializer' of undefined (#4351)
- [bugfix] Fix whitespace rule in importClause with 'as' statement (#4249)
- [bugfix]
no-invalid-this: fixes false positives on method-like syntax and false negatives on nested functions (#4034) - [bugfix]
one-line: Check block in a case clause (#3619) - [bugfix]
whitespaceDon't require space between import and paren with in type imports (#4243) - [bugfix] remove
no-unused-variablefromtslint:all(#4079) - [bugfix]
callable-typessupport interfaces containing a single construct signature (#4291) (#4352) - [bugfix]
ordered-imports: Settingimport-sources-order: anyno longer invalidatesgrouped-imports: true(#4374) - [develop] Add issue templates (#4028)
- [develop] Add test for 3.0 (#4119)
- [develop] Changes the node version from 4 to 6 for TS 2.1 tests. (#4282)
- [develop] Fix prettier command in package.json (#4275)
- [develop] Fix semantic merge break from #4374 and #3733 (#4378)
- [develop] Fix typo in launch.json (#4287)
- [develop] Prettier (#4012)
- [develop] Re-ran Prettier on source files again, with some more ignores (#4270)
- [develop] Update 'json-stringify-pretty-compact' to 1.2.0 and remove unnecessary type declaration (#4371)
- [develop] Upgrade prettier and run over all files (#4214)
- [docs] "< 0" means less than zero, not greater than (#4183)
- [docs] Added badges for dependencies status (#4160)
- [docs] Additional code examples for rules (#3869)
- [docs] Clarify no-shadowed-variable doc (#4347)
- [docs] Fix docs typo (#4165)
- [docs] Fix docs typo (#4182)
- [docs] Fix typo in index.md (#4242)
- [docs] Fix typos in formatter descriptions (#4288)
- [docs] Fixed typo in documentation (#4047)
- [docs] Includes new name Azure DevOps for VSO (#4289)
- [docs] Typo correction in no-unused-expression (#4322)
- [docs] Update documentation to reflect changes made in #2229. (#4336)
- [docs] Update stylish example (#4095)
- [docs] Use latest docs deps to avoid vulnerable libs (#4366)
- [docs] prefer-object-spread: this is new to ES2018, not ES2015 (#4321)
- [documentation] Update configuration documentation to include array syntax (#4258)
- [enhancement] Add
homepageto package.json (#4101) - [enhancement] Add esSpecCompliant: true to recommended trailing-comma config (#4072)
- [enhancement] Add new tests to workflows (#4054)
- [enhancement] Add quiet flag to hide warnings (#4025)
- [enhancement] Don't flag unmatched ${ in no-invalid-template-strings (#3769)
- [enhancement] Show offending value in 'no-magic-numbers' error message (#4332)
- [enhancement]
ordered-imports: Whengrouped-importsoption of the rule is set, the fact that imports of the same type are all in one group is also checked. (#3733) - [enhancement] Yaml parser now uses default schema, allowing for
<<:to be used to merge anchors (#4350) - [enhancement] Improve JUnit formatter (#4327)
- [enhancement] completed-docs: check properties and methods in interfaces (#4032)
- [enhancement] file-name-casing-rule supports regex expression for matching file (#4284)
- [enhancement] prose formatter uses
line:columninstead of[line, column](#4222) - [rule-change] Add "backtick" option for quotemark (#4029)
- [rule-change] Allow void expressions in binary expressions (#4323)
Thanks to our contributors!
- Shinigami
- Matthew Herbst
- Joshua R
- John Wiseheart
- Mitchell Wills
- Eric Ferreira
- Daniel Reichhart
- Rui
- Pavel Birukov
- Brian Schlenker
- Michael Black
- Andy Hanson
- atsu85
- PomanoB
- Oleg Vaskevich
- Daniel McNab
- Jan Pilzer
- Sebastian Silbermann
- Michael Lavina
- reduckted
- Ryan Waskiewicz
- Bowen Ni
- Josh Goldberg
- Erik
- Nathan
- Kevin Verdieck
- Joe Chung
- Peter Safranek
- Xavier Downs
- Igor Ovsiannikov
- RyosukeFukushima
- Andrew Boyton
- samuela
- stefanhamburger
- Carsten Dietzel
- Jakob Warkotsch
- Karthick Manoharan
- Ian Clanton-Thuon
- Yordis Prieto
- Mike Frysinger
- Dario Banfi
- Gérôme Grignon
- Antony74
- Morgan Zolob
- Young Min Kim
- rrogowski
- Eric Anderson
- Simon Marchi
- ulrichb
- Marvin Altemeier
- Ifiok Jr
- Andrew MacLeay
- Ethan
- Dan Homola
- NN
- Roman Rogowski
v5.11.0
⚠️ Deprecations
- [deprecation]
no-unused-variableis deprecated because typescript now covers most of its functionality (#3919)
🎉 Features
- [new-rule]
file-name-casing(#3978) - [new-fixer] Add fixer for
switch-final-break(#3615) - [new-fixer] Implemented fixer for
member-orderingand added corresponding tests. (#3935) - [new-rule-option] Add whitelist for
no-implicit-dependencies(#3979)
🛠️ Bugfixes & enhancements
- [bugfix]
no-use-before-declareFixes false positives when using the destructuring syntax (#3761) (#3876) - [bugfix] Fix Copyright: @license JSDoc tag was missing (#3879)
- [bugfix] Fix missing newline at end of file (#3896)
- [bugfix] allow-empty-functions option of
no-emptyrule is now properly respecting empty methods (#3897) - [bugfix]
no-magic-numbers- support for negative zero (#3903) - [bugfix] Handle tsconfig.json errors without using JSON.stringify (#3908)
- [bugfix] Fix CI:
no-implicit-dependenciestest failure; typescript@next failure (#4019) - [bugfix] Fix edge case in
no-consolerule (#4041) - [docs] Fix typos in the
no-floating-promisesrule docs. (#3886) - [docs] Updated
prefer-whiledocs to be semantically correct (#3888) - [docs] Fix link to configuration page (#3891)
- [docs] Fix docs typo (#3898)
- [docs] Fix docs typo (#3910)
- [enhancement] Turn on strictPropertyInitialization for src/ and test/ (#3924)
- [enhancement] Use Buffer.allocUnsafe instead of the deprecated new Buffer() (#3985)
- [enhancement] Improve
radixrule checks (#3901) - [enhancement] Output +/- on diff so added/removed empty lines are visible. (#3973)
- [rule-change]
no-implicit-dependenciesnow always considers peer dependencies (#3875)
Thanks to our contributors!
- Bowen Ni
- Peter Safranek
- Saugat Acharya
- Jason Mendes
- Ryan Waskiewicz
- Dariusz Rumiński
- Xinhu Liu
- Rado Kirov
- aervin_
- Josh Goldberg
- mertdeg2
- Jason Killian
- Adrian Leonhard
- david-cannady
- Andy Russell
- Tibor Blenessy
- Andrew Crites
- Pavel Birukov
- shalomdotnet
v5.10.0
🎉 Features
- [new-rule]
prefer-while(#3750) - [new-fixer]
comment-format(#3845) - [new-rule-option]
"allow-empty-functions"forno-emptyrule (#3624) - [new-rule-option] New options for
promise-function-asyncspecifying what kinds of functions to check (#3807)
🛠️ Bugfixes & enhancements
- [bugfix]
file-headerrule plays nice withno-trailing-whitespacerule (#3802) - [bugfix]
no-unbound-methodrule allows square bracket property access (#3610) - [bugfix]
no-unsafe-anyno longer marks native JSX elements as unsafe (#3699) - [enhancement]
file-headerauto-fixes use '!' character to ensure header stays above imports (#3741) - [enhancement] Better error messages if a rule crashes (#3836)
- [enhancement] Better error messages when no valid rules are specified (#3729)
- [enhancement] Better lint messages for unused imports in
no-unused-variablerule (#3831) - [docs] Improve documentation of cli flag --project (#3703)
- [docs] Added short rationales for about thirty rules (#3734)
- [docs] Added optional capability to provide code examples in rules' metadata (#3602)
- [docs] Many small docs fixes and tweaks from many great contributors!
Thanks to our contributors!
- Achim Weimert
- BB9z
- Blair Zajac
- Chia-Lun Wu (Leo)
- Ethan
- Janis Koehr
- Josh Goldberg
- Julian Verdurmen
- Lucas Sloan
- Mark Vincze
- Martin Möhwald
- Oliver Joseph Ash
- Pichest Wongsiripiphat
- Rafael Santana
- Ruben Bridgewater
- Ryan Waskiewicz
- Sehrope Sarkuni
- Suchan Lee
- Victor Belozyorov
- aervin_
- cwgorman
- felipeissa
- jishi9
v5.9.1
🛠️ Bugfixes
- [bugfix] Removed extraneous deprecation warning produced when using
tslint:recommendedortslint:latestby disablingtypeof-comparein these rulesets. (#3639) - [bugfix] Resolve directories as absolute paths when validating custom
rulesDirectorypaths, which fixes usage with tslint-loader. (#3640)
v5.9.0
⚠️ Deprecations
- [deprecation] Several utility functions from
src/language/utils.tshave been deprecated (#3476) - [deprecation] Linting non-existent files now outputs a warning. This will be an error in TSLint 6. (#3313)
Configuration inheritance changes
Significant changes have been made to configuration inheritance to address a long-standing UX issue around defaultSeverity: #2569.
defaultSeverity defined in a tslint.json file will now override the defaultSeverity 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 multiple
configuration 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:
- Override
defaultSeveritydefined in extended configs (#3449) - Inherit defaultSeverity and apply it to preceding base configs (#3530)
🎉 Features
- [feature] Support yaml configuration files (#1598) (#3433)
- [new-fixer]
file-header(#3475) - [new-rule]
no-dynamic-delete(#3573) - [new-rule]
prefer-readonly(#2896) - [new-rule]
newline-per-chained-call(#3278) - [new-rule-option]
"temporalDeadZone"forno-shadowed-variableto ignore shadowing in the temporal dead zone of classes, parameters, enums and variables declared withletorconst(#3389) - [new-rule-option]
"shorthand-first"forobject-literal-sort-keys(#3607) - [new-rule-option] Add support for an ignore pattern for
max-line-length(#3099)
🛠️ Bugfixes & enhancements
- [bugfix] Update commander.js dependency to prevent users from transitively installing a buggy 2.12.0 release (#3510)
- [bugfix]
--projectexcludes all files of external dependencies (#3320) - [bugfix] Show errors when
tsconfig.jsonis invalid (#3410) - [bugfix]
no-implicit-dependenciesdon't crash on malformed package.json (#3373) - [bugfix]
strict-type-predicatesallows comparing typeof result with non-literals (#3542) - [bugfix]
no-redundant-jsdocfixed crash on unhandled tag (#3414) - [bugfix]
object-literal-sort-keysfixed regression that effectively disabled the rule with\r\nline breaks (#3427) - [bugfix]
curlyfixer now correctly handles comments (#3473) - [bugfix]
no-unsafe-anyfixed false-positive with namespaced types (#3487) - [bugfix] Removed potentailly dangerous fixer for
no-any(#3486) - [bugfix]
no-unnecessary-type-assertionfixed false negatives for types with numeric keys (#3468) - [bugfix]
callable-typesadds parentheses when fixing a type literal inside an array type (#3440) - [bugfix]
no-unsafe-anyallows spreading ananyvalue into an object (#3439) - [bugfix] no unnecessary whitespace before argument in callback functions fixed with
arrow-parensfixer (#3618) - [bugfix]
prefer-constfalse negative with index signature named like a variable (#3385) - [bugfix]
whitespacerule checks property declarations if"check-decl"is enabled (#3546) - [bugfix] Using ternary operator for calling super() now passes
no-duplicate-superrule. (#3544) - [bugfix]
no-shadowed-variablenow excludes declaration files and ambient modules (#3387) - [bugfix]
no-duplicate-importsAllow duplicate imports from separate ambient module declarations (#3398) - [bugfix]
await-promisecorrectly recognises classes extending Promise (#3383) - [bugfix]
prefer-conditional-expression: don't repeat error on nested if statements (#3528) - [bugfix]
completed-docs: don't require documentation on methods in object literals (#3532) - [bugfix]
one-linefixed crash on syntax error in class or interface (#3538) - [bugfix]
no-redundant-jsdocallow@templatetag if it has a description (#3415) - [bugfix] Fix condition for deprecation of
typeof-compare(#3429) - [enhancement] Better error message for files not contained in the project (#3313)
- [enhancement]
"properties"option forcompleted-docsrule now checks getter and setter accessors. (#3497) - [enhancement]
no-magic-numbersignores parseInt radix parameter (#3536) - [enhancement] Avoid duplicate I/O when using
--projectoption (#3313) - [enhancement] clicking the filename in
stylish-formatter's output jumps to the first failure in that file. (#3491) - [enhancement]
ban-comma-operatorignores comma operator inside for-loop incrementor (#3485) - [enhancement]
space-within-parensupdated to always allow empty parentheses(). (#3513) - [enhancement] Better error message syntax for
completed-docsmodifier lists (#3379) - [enhancement] Improve failure message & docs for
ban-comma-operator(#3384) - [enhancement] Output code warnings in yellow instead of red for codeFrame formatter (#3402)
- [enhancement] Converted
completed-docsrule to use a function instead of a walker (#3466) - [docs]
ban-comma-operator: fix metadata, list as "functionality" rule (#3612) - [docs] Enhance
no-use-before-declaredocumentation to clarify the rule's status (#3520) - [docs] Enhance
await-promiseoptions documentation (#3519) - [docs] Add
hasFixmetadata for theindentrule (#3529) - [docs] Clearer rule description for
no-irregular-whitespace(#3627)
Thanks to our contributors!
- Klaus Meinhardt
- Josh Goldberg
- Chris Barr
- Nathan Shively-Sanders
- Jeremy Morton
- Sergey Koshechkin
- Daniel Kucal
- Eric Smekens
- Johannes Choo
- Elena Vilchik
- Eugene Timokhov
- Carlo Bottiglieri
- reduckted
- Glavin Wiechert
- jbsingh
- Mateusz Witkowski
- HideDev
- Bruno Lemos
- aervin_
- Roman
- Ryan Waskiewicz
v5.8.0
⚠️ Deprecations
- [deprecation]
typeof-compareis deprecated because typescript already does that check (#3286) - [deprecation] CLI argument
--type-checkis 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,
🎉 Features
- [feature] Added
linterOptionsconfiguration field totslint.json, which supports a list ofexcludeglobs 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-formatadds option"check-multiline-start"to enforce the first line of a multiline JSDoc comment to be empty. (#3181) - [new-rule-option]
trailing-commaadds 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 formember-accessrule (#3325) - [new-rule-option]
"strict-bound-class-methods"option forsemicolonrule (#3294) - [new-rule-option]
"grouped-imports"option forordered-importsrule (#3138) - [new-rule-option]
"ignore-blank-lines"option forno-trailing-whitespacerule (#3346) - [new-rule-option]
"never"option forobject-literal-shorthanddisallows shorthand notation (#3268) - [new-rule-option]
"exclude-class-expressions"option formax-classes-per-filerule (#3281) - [new-rule-option]
no-unnecessary-type-assertionsupports a whitelist of types to ignore (#3257) - [new-rule-option]
"module-source-path"forordered-importsallows sorting imports by trailing end of path (#3178) - [new-formatter] JUnit (#3194)
🛠️ Bugfixes & enhancements
- [bugfix]
no-empty-interfaceallows 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-undefinedhandles union return types in async functions (#3298) - [bugfix]
deprecationchecks correct constructor overload (#3203) - [bugfix]
return-undefineddeclared return type takes precedence over contextual type (#3298) - [bugfix] Correctly mark
inputFilePathas an optional parameter inConfiguration.findConfiguration()(#3195) - [bugfix]
return-undefinedfixed regressions: once again allows anything if return type isany(#3298) - [bugfix]
only-arrow-functionsallow function ifthisis used in parameter initializer (#3315) - [bugfix]
no-conditional-assignment: exclude intentional assignments, e.g. inside functions (#2629) - [bugfix]
no-angle-bracket-type-assertionfixer adds parentheses when necessary (#3301) - [bugfix]
no-angle-bracket-type-assertionfixed order when autofixing consecutive assertions (#3301) - [bugfix]
vsoformatter no longer duplicates output for fixed failures (#3348) - [bugfix]
no-unbound-method: Allow negation of method (#3349) - [bugfix]
arrow-parenswith option"ban-single-arg-parens"no longer produces invalid code when fixed (#3247) - [bugfix] Fixed regression where the lookup of
tslint.jsonstopped at the current directory. (#3309) - [bugfix]
--testworks correctly with anycompilerOptions.target(#3296) - [bugfix]
whitepacehandles files with BOM and other irregular whitespace (#3305) - [bugfix]
callable-typesauto fix produces invalid results (#3342) - [bugfix]
no-string-literalcorrectly fix property names with leading underscores (#3184) - [bugfix]
variable-namefixed crash on empty variable name (#3292) - [bugfix]
trailing-commafixed crash on arrow function without parens (#3246) - [bugfix] Fix
space-before-function-parenfor anonymous/arrow generic functions (#3085) - [bugfix] Removed warning printed to console when using the
no-unused-variablealong with thenoUnusedLocalsandnoUnusedParameterscompiler options (#3227) - [bugfix]
no-invalid-thisignores functions with athisparam (#3267) - [enhancement] Sort failures by line and character for formatters (#3345)
- [enhancement]
import-blacklistalso checks exports and dynamic imports (#3258) - [enhancement]
no-conditional-assignmentadded check for conditional (ternary) expressions (#2629) - [enhancement] Allow
completed-docsto 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-promiseenforces thatfor-await-ofis only used withAsyncIterable(#3297) - [enhancement]
one-linechecks type alias declarations (#3200) - [enhancement]
deprecationchecks object destructuring (#3318) - [enhancement]
no-submodule-importsalso checks exports (#3258) - [enhancement]
restrict-plus-operands: More specific error message when arguments include strings (#3220) - [enhancement]
no-unsafe-anychecks 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
colorsmodule tochalkmodule (#3171) - [enhancement]
no-unused-variableapplies 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
v5.7.0
🎉 New rules, options, and fixers
- [new-rule]
no-parameter-reassignment(#3045) - [new-rule-option]:
object-literal-sort-keys: Addmatch-declaration-orderoption (#2829) - [new-rule-option]
check-type-operatorforwhitespacerule (#3083) - [new-rule-option]
whitespace: Addcheck-rest-spreadoption (#3089)
🛠️ Bugfixes & enhancements
- [api]
AbstractRule#applyWithFunctionallows additional parameter that is passed through towalkFn(#3140) - [api]
AbstractRule#applyWithFunctionhas better type checking for its type parameter (#2660) - [bugfix]
member-accessautofix now correcly insertspublickeyword after decorators (#3162) - [bugfix]
prefer-constcorrectly handlecatchwithout binding parameter introduced intypescript@2.5.1(#3151) - [bugfix]
no-invalid-template-stringsallows backslash-prefixed template expressions (#3116) - [bugfix]
deprecationno longer shows errors on imports and exports (#3141) - [bugfix]
deprecation: fix false positive when calling a function or method where another overload is deprecated (#2883) - [bugfix]
whitespace: fixed"check-separator"for trivialforcases. (#3132) - [bugfix]
prefer-object-spreadprevent spreadingthisas it is not allowed by the compiler (#3126) - [bugfix]
msbuildformatter uses backslashes in paths on Windows (#3145) - [bugfix]
no-namespaceignores global augmentation (#3161) - [enhancement] remove superfluous empty lines on tslint output. (#3121)
- [enhancement]
no-submodule-importsallows whitelisting of submodules like@angular/core/testing(#3129) - [enhancement] custom lint rules will be resolved using node's path resolution to allow for loaders like
ts-node(#3108) - [enhancement]
quotemarkno longer requires"single"or"double"to be the first option. The rule defaults to"double"if none is specified. (#3114) - [enhancement]
no-unused-variableautofix removes trailing comments of imports (#3156) - [enhancement]
no-unnecessary-type-assertionallows certain necessary assertions to prevent type widening (#3120)
Thanks to our contributors!
- Paul Gschwendtner
- Andy Hanson
- ksvitkovsky
- Santi Albo
- aervin
- Junle Li
- Joscha Feth
- WiseBird
- Caleb Eggensperger
- WGroenestein
- Bowen Ni
v5.6.0
🎉 New rules, options, and fixers
- [new-rule]
no-duplicate-imports(#3075) - [new-rule]
no-submodule-imports(#3091) - [new-rule]
space-within-parens(#2959) - [new-fixer]
member-access(#2969) - [new-fixer]
no-null-keyword: fixx == nulltox == undefined(#2802) - [new-rule-option]
no-shadowed-variablelet's you optionally ignore certain kinds of declarations (#3030) - [new-rule-option]
prefer-conditional-expressionaddscheck-else-if(#2963)
🛠️ Bugfixes & enhancements
- [bugfix]
array-type: considerthisto be simple type (#2982) - [bugfix]
await-promiseaccepts not only union types but also intersection types with Promise-like types (#2987) - [bugfix]
callable-types: don't remove export modifier of interfaces (#2962) - [bugfix]
completed-docs: Only checks variables at the file-level. (#2950) - [bugfix]
completed-docs: Uses correct visibility of variables. (#2950) - [bugfix]
no-floating-promises: recognize rejection handler passed as second argument topromise.then()(#3048) - [bugfix]
no-shadowed-variabledon't warn for shadowed type parameter on static class members (#3030) - [bugfix]
no-shadowed-variablefixed false positive with key name in index signature (#3030) - [bugfix]
no-shadowed-variablefixed false positive with parameter inside function decorator (#3030) - [bugfix]
no-unsafe-any: allow truthyness and falsyness checks (#3008) - [bugfix]
no-unused-variablefixed crash when using destructuring (#3058) - [bugfix]
one-linecorrectly handles multiline type parameters (#3004) - [bugfix]
prefer-for-offixed false positives when array is modified, e.g.arr[i]++(#3044) - [bugfix]
prefer-object-spreadadds parens when fixing arrow function return (#3026) - [bugfix]
prefer-object-spreadpermit functions as first argument to Object.assign (#3098) - [bugfix]
space-before-function-parenHandle default exports of functions without names like anonymous functions (fixes #3040) (#3053) - [bugfix] Fixed an issue where, at runtime, the module
./test/parsecould not be located due after consumers had runyarn clean(#3072) - [enhancement]
no-null-keywordallows strict comparison (#2802) - [enhancement]
no-switch-case-fall-throughmatches// falls throughcomments case insensitive and allows trailing text (#2983) - [enhancement]
ordered-imports: support importEqualsDeclaration (#3102) - [enhancement] Added NaN and (+/-)Infinity as numbers to
no-inferrable-types(#2885) - [enhancement] Improved CLI error message when no filenames are specified (#3066)
- [rule-change]
prefer-conditional-expression: ignoreif-else-ifby default. Use the new"check-else-if"option to check nested if statements (#2963)
Thanks to our contributors!
- Klaus Meinhardt
- Julian Verdurmen
- Alexandre Alonso
- Josh Goldberg
- ksvitkovsky
- Daisuke Yokomoto
- Andrii Dieiev
- Florent Suc
- Jason Killian
- Amin Pakseresht
- reduckted
- vilicvane
- Russell Briggs
- Andy Hanson
- Leo Liang
- Dan Homola
- BehindTheMath
- David Golightly
- aervin
- Daniel Kucal
- Ika
- Chris Barr
v5.5.0
Editor's note: This release features an important bugfix for overlapping fixes when using --project and --fix (#2864).
🎉 New rules and options
- [new-rule-option]
completed-docs: Addenum-membersoption (#2911) - [new-rule]
no-this-assignment(#2931)
🛠️ Bugfixes & enhancements
- [bugfix]
encodingcloses files correctly (#2958) - [bugfix]
whitespacefix whitespace"check-module"to properly lint and fix errors (#2401) (#2825) - [bugfix]:
whitespace: now correctly handles dynamic imports introduced in typescript@2.4.0 (#2924) - [bugfix]
switch-final-break: don't fail if break jumps to a label outside of the switch (#2914) - [bugfix]
no-shadowed-variable: exemptthisparameter (#2598) - [bugfix]
prefer-for-ofcorrectly handles variable scopes and other unrelated identifiers (#2984) - [bugfix] Don't leave blank lines when
no-unused-variableautofix removes whole import (#2901) - [cli] restore
-voption (#2926) - [enhancement] Print stack trace of exceptions (#2890)
- [enhancement] Added allow-empty-catch option to
no-empty(#2886) - [enhancement]
prefer-const: handle destructuring in for-of loop initializer as if{"destructuring": "all"}was specified (#2904) - [enhancement]
no-shadowed-variable: added checks for other shadowing declarations, e.g. interfaces, classes, type parameters, imports, etc. (#2598) - [rule-change]
no-shadowed-variableno longer fails for declarations in the same scope, e.g.var foo; var foo;. Use the ruleno-duplicate-variableto find such errors. (#2598)
Thanks to our contributors!
- Klaus Meinhardt
- Josh Goldberg
- Petr Kosikhin
- Pablo Núñez
- Benny Neugebauer
- Radon Rosborough
- reduckted
- Chris Barr
- Julian Verdurmen
v5.4.3
🛠️ Bugfixes
- [bugfix] Fixed regression with empty
--outfile (#2867) - [bugfix]
unified-signatures: Don't suggest to unify rest parameters. (#2874) - [bugfix]
binary-expression-operand-order: Allow if both sides of the binary expression are literals. (#2873) - [bugfix] Restore compatibility with typescript@2.1 and 2.2 for
whitespace,space-before-function-parenanddeprecation(#2893) - [docs]
no-string-literal: Fix documentation (#2875)
v5.4.2
🛠️ Bugfixes
- [bugfix] Restored support for multiple
--excludeoptions in the CLI (#2855) - [bugfix] Restored support for
--versionCLI option (#2857)
v5.4.1
🛠️ Bugfixes
- [bugfix] Fixed regression in
--excludeCLI option when using--project(#2852)
v5.4.0
⭐ Non-breaking API changes
--type-checkonly checks for errors before linting is no longer required to enable rules that use the type checker. You only need to supply--projectnow.
🎉 New rules, options, and fixers
- [new-rule]
switch-final-break(#2804) - [new-rule]
use-default-type-parameter(#2253) - [new-rule]
binary-expression-operand-order(#2805) - [new-rule-option]
bannew options format: allows to specify an optional explanation message for function bans, banning nested methods and using a wildcard for object of a method ban (#2547) - [new-rule-option]
no-duplicate-variableaddscheck-parametersoption to check if variable has the same name as a parameter (#2597) - [new-rule-option]
curly: "as-needed" option (#2842) - [new-rule-option]
no-unbound-methodadd option"ignore-static"(#2751) - [new-rule-option]
strict-boolean-expressionsaddsallow-boolean-or-undefined(#2820) - [new-fixer]
object-literal-shorthandcan fix longhand methods (#2558)
🛠️ Bugfixes & enhancements
- [bugfix]
prefer-object-spreadallows constructor, function and method calls and more as first argument toObject.assign(#2828) - [bugfix]
no-unbound-methodwalker skips past the parent if it is a cast or parenthesized expression (#2838) - [bugfix]
object-literal-shorthand: fixed suggestion for generator functions (#2558) - [bugfix] Fixed issue with case sensitivity of
no-unused-variablerule on Windows (#2819) - [bugfix] don't crash
tslint --projectifallowJsis set in tsconfig.json (#2823) - [bugfix]
alignwith option"members": check members of class expressions; don't check semicolons in classes (#2668) - [bugfix]
no-inferred-empty-object-type: fix stack overflow (#2762) - [bugfix]
semicolon: don't warn about unnecesary semicolon when it is actually needed, e.g. when followed by type assertion or template string (#2655) - [bugfix]
space-before-function-paren: Ignore async arrow function with no parentheses (#2833) - [bugfix]:
no-unsafe-any: Don't fail oncontinue label;(#2830) - [bugfix]
no-unbound-method: Allow unbound method to be used as a condition (#2834) - [bugfix]
no-unsafe-any: Allow to switch on a value of typeany(#2836) - [bugfix]
no-unsafe-any: Don't markdeclare global {}as an unsafe any. (#2839) - [bugfix]
indentnow checks indentation of expressions inside template strings (#2826) - [enhancement]
--project(or-p) enables rules that require the type checker.--type-checkonly checks for errors before linting is no longer required (#2773) - [enhancement]
deprecation: error message includes deprecation text if available (#2748) - [enhancement]
cyclomatic-complexity: Don't count empty switch case(#2743) - [enhancement]
strict-boolean-expressions: Allowany, andtrueandfalseliteral types (#2758) - [enhancement]
no-floating-promises: Allow 'promise.catch()' (#2774) - [enhancement]
comment-formatno longer excludes comments with triple slash from linting except/// <reference path="..."/>(#2616) - [enhancement]
prefer-object-spread: lint more locations where return value is used. (#2828) - [enhancement]
semicolon: option"never"is now spec compliant (#2655) - [enhancement]
object-literal-shorthandhandles async functions correctly (#2558) - [enhancement]
--testCLI option: allow passing path to tslint.json (#2784) - [enhancement] Use commander instead of optimist for CLI arguments (#2689)
- [enhancement]
strict-type-predicates: warn if strictNullChecks is not enabled (#2786)
Thanks to our contributors!
- Klaus Meinhardt
- Manuel Lopez
- Andy Hanson
- Piotr Tomiak
v5.3.2
- [bugfix] Fixes
not a directoryerror (#2813)
v5.3.0
This change may require a change to tslint.json
- [enhancement]
prefer-switch: Change defaultmin-casesto 3. (#2669)
🎉 Features & enhancements
- [new-cli-option] cli: Add
outputAbsolutePathsoption (#2667) - [new-rule]
prefer-object-spread(#2624) - [new-rule]
encoding(#2368) - [new-rule]
prefer-conditional-expression(#2363) - [new-rule-option]
indentsupport indent size (#2723) - [new-rule-option]
object-literal-sort-keysaddsignore-case(#2592) - [new-rule-option]
quotemark: Addavoid-templateoption (#2766) - [new-rule-option]
await-promise: What's considered a "Promise" is now configurable. (#2661) - [new-fixer]
indent(#2723) - [new-fixer]
typedef-whitespace(#2718) - [enhancement] better error messages in
variable-name(#2672) - [enhancement]
typedef: Use name or parameters for error location (#2460) - [enhancement]
object-literal-sort-keys: check shorthand properties (#2592) - [enhancement]
space-before-function-paren: Handleget/setaccessor (#2700) - [enhancement]
typedef-whitespaceadded checks for arrow function, call and construct signature (#2718) - [enhancement]
no-object-literal-type-assertion: Allow cast toany(#2671) - [enhancement] cli:
-poption handles directories (#2756) - [develop] testing rules with type information is enabled when a
tsconfig.jsonis found next totslint.json(#2769) - [configuration] deprecate mixed case tslint.json (#2713)
- [bugfix]
return-undefined: Treat a return typevoid | undefinedsame asvoid(#2731) - [bugfix]
no-unnecessary-initializer: HandleBindingElementanywhere, not just in aVariableDeclaration. (#2707) - [bugfix]
jsdoc-format: correctly handle alignment in files with BOM (#2619) - [bugfix]
jsdoc-format: don't treat empty comments (/**/) as jsdoc (#2619) - [bugfix]
typedef-whitespacedon'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: fixed error position if line ends with\r\n(#2619) - [bugfix]
prefer-switch: add missing checks for some expressions (#2686) - [bugfix]
prefer-template: Allow"a" + "b" + "c". (#2741) - [bugfix]
prefer-const: fix false positive with variable declared outside of for-of or for-in (#2760) - [bugfix]
--project: fix file matching with relative path totsconfig.json(#2688) - [bugfix]
no-default-export: correctly handleexport default abstract class {...}(#2630) - [bugfix]
no-mergeable-namespace: display correct line in error message (#2656) - [bugfix]
object-literal-sort-keys: handle object spread correctly (#2592) - [bugfix] Consistently output absolute/relative paths (#2667)
- [bugfix]
await-promise: Consider types derived from a Promise in union types too. (#2661) - [bugfix]
no-unsafe-any: Fix bug where number literal in type position was flagged as an unsafeany. (#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
- [rule-change]
no-consolebans all console methods when no methods are specified (#2610) - [new-rule]
no-object-literal-type-assertion(#2580) - [new-rule]
no-irregular-whitespace(#2487) - [new-rule]
prefer-switch(#2331) - [new-rule]
number-literal-format(#2526) - [new-rule]
deprecation(#2395) - [new-rule]
no-unnecessary-type-assertion(#2519) - [new-fixer]
interface-over-type-literal(#2617) - [new-fixer]
callable-types(#2552) - [new-fixer]
no-string-literal(#2495) - [new-fixer]
no-internal-module(#2517) - [new-rule-option]
alignrule addedmembersoption, which checks alignment of methods and properties of classes, objects, interfaces, type literals and object destructuring (#2387) - [new-rule-option]
alignrule addedelementsoption, which checks alignment of elements in array literals, array destructuring and tuple types (#2387) - [new-rule-option]
trailing-commaadds more granular options to specify trailing commas for arrays, objects, functions, type literals, imports, and exports (#2538) - [api] Deprecate
ScopeAwareRuleWalkerandBlockScopeAwareRuleWalker. (#2561) - [develop] added support for error templates in rule tests (#2481)
- [bugfix] Fixes "Severity for rule not found" error (#2516)
- [bugfix]
no-unused-expression: allowvoid(0)in addition tovoid 0andvoidin expression and statement position (#2645) - [bugfix]
align: fix false positive for files with BOM (#2642) - [bugfix]
return-undefined: Handle contextual types with ambiguous signatures; allowany; and handle async functions. (#2576) - [bugfix]
semicolon: don't mark semicolon as unnecessary when the next statement is on the same line (#2591) - [bugfix]
no-internal-module: no more false positives for global augmentation (#2517) - [bugfix]
no-unnecessary-qualifier: no longer breaks when walking a function that referencesarguments(#2555) - [bugfix]
prefer-constno longer shows warnings on ambient declarations (#2391) - [bugfix]
callable-types: suggest correct fix for interfaces with type arguments (#2552) - [bugfix]
quotemark: fix regression with jsx attributes (#2605) - [bugfix]
adjacent-overload-signatureshandles functions ending in semicolon (#2412) - [bugfix]
object-literal-key-quotes: correctly stringify numbers when fixing (#2515) - [bugfix]
object-literal-key-quotes: does no longer require quotes for property names containing digits (#2515) - [enhancement] Failures in extended config files now indicate which file (#2588)
- [enhancement]
align: Don't report 'statements are not aligned' for empty statements (#2653) - [enhancement]
class-namenow also checks class expressions (#2553) - [enhancement]
optionExamples: Allow to use an options array directly instead of a string representation. (#2527) - [enhancement]
rulesDirectorycan now be resolved with Nodes resolve logic, if the directory contains anindex.js(#2163) (#2358) - [enhancement]
no-unused-expression: narrow error location for comma separated expressions and conditional expressions (#2645) - [enhancement]
no-string-literalnow handles escaped strings (#2495) - [enhancement]
no-unnecessary-callback-wrapper: Allowx => x(x)(#2524) - [enhancement]
no-var-keyword: Allow global var declarations (#2513)
Thanks to our contributors!
- Andy Hanson
- Alex Eagle
- Donald Pipowitch
- Klaus Meinhardt
- Gord P
- Andy
- Quentin
- Mitchell Wills
- Vito
- CSchulz
- Josh Goldberg
- Brian Olore
- Manuel Lopez
- James Clark
v5.1.0
- [new-rule]
no-invalid-template-strings(#2332) - [new-rule]
no-sparse-arrays(#2407) - [new-rule-option]
no-void-expression: addsignore-arrow-function-shorthand(#2445) - [api]
tslint:allconfiguration (#2417) - [bugfix] In tslint:recommended move
no-reference-importfromjsRulestorules(#2441) - [bugfix]
no-unnecessary-callback-wrapper: only check if callback is identifier, allow all other expressions (#2510) - [bugfix]
member-access: Skip index signature, it can not have an access modifier (#2437) - [bugfix]
restrict-plus-operandsfixes regression where every assignment and comparison was checked (#2454) - [bugfix]
no-unnecessary-callback-wrapper: allow async wrapper function (#2510) - [bugfix]
prefer-for-of: No error ifdeleteis used (#2458) - [bugfix]
radix: don't warn for missing radix on method calls (#2352) - [bugfix]
no-use-before-declare: Handle symbol with empty declarations list. (#2436) - [bugfix]
strict-type-predicates: Check for construct signatures inisFunction. (#2479) - [enhancement]
strict-boolean-expressions: When--strictNullChecksis turned off,allow-null-unionandallow-undefined-unionturn off "always truthy" errors. (#2373) - [enhancement]
radix: added check for global.parseInt and window.parseInt (#2352) - [enhancement]
arrow-return-shorthand: Improve failure message when return expression is an object literal (#2466)
Thanks to our contributors!
- Andy Hanson
- bumbleblym
- Klaus Meinhardt
- Jonas Kello
- Minko Gechev
- Donald Pipowitch
v5.0.0
🔥 Breaking changes
- Minimum version of TypeScript version is now 2.1.0 (#2425)
- The severity level of rules are now configurable and defaults to severity "error". This affects the output of formatters:
- [formatter]
msbuildwas outputting all failures as "warning". - [formatter]
pmdwas outputting all failures as priority 1. Now, it uses priority 3 for "error" (default) and priority 4 for "warning"
- [formatter]
- [formatter]
jsonchanged thefixproperty to now contain either one replacement or an array of replacements (#2403) tslint:recommendedconfiguration updated withtslint:latestrules & options (#2424)- Removed
no-unused-newrule, with logic moved intono-unused-expression(#2269) no-trailing-whitespacenow checks template strings by default. Use the new optionsignore-template-stringsto restore the old behavior. (#2359)
API breaks for custom rules
-
Removed method
skipfromRuleWalker(#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-variableno-use-before-declare
-
This breaks custom rule compilation. If your rule was not using the
ts.LanguageServiceAPIs, the migration is quite simple:
- public applyWithProgram(srcFile: ts.SourceFile, langSvc: ts.LanguageService): Lint.RuleFailure[] { - return this.applyWithWalker(new Walker(srcFile, this.getOptions(), langSvc.getProgram())); + public applyWithProgram(srcFile: ts.SourceFile, program: ts.Program): Lint.RuleFailure[] { + return this.applyWithWalker(new Walker(srcFile, this.getOptions(), program));- N.B. If you are refactoring your custom rules, consider these performance tips for writing custom rules.
-
-
Removed
createFix. Replacements should be passed directly into addFailure. (#2403) -
Removed deprecated
scanAllTokensandskippableTokenAwareRuleWalker(#2370)
🎉 Notable features & enhancements
-
[feature] The severity level of rules are now individually configurable. Default severity can also be configured. (#629, #345)
- Valid values for
severity:default|error | warn | warning | none | off - Valid values for
defaultSeverity:error | warn | warning | none | off - Old style:
{ "extends": "tslint:latest", "rules": { "callable-types": true, "max-line-length": [true, 140] } }- New style (in this example,
callable-typesoutputs errors andmax-line-lengthoutputs warnings):
{ "extends": "tslint:latest", "defaultSeverity": "error", "rules": { "callable-types": true, "max-line-length": { "options": 140, "severity": "warning" } } } - Valid values for
-
[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
- [api] Added class
OptionallyTypedRule, which allows rule authors to write a rule that applies when typing is either enabled or disabled (#2300) - [bugfix]
prefer-function-over-methodnow ignores abstract methods (#2307) - [bugfix]
arrow-parenswith optionban-single-arg-parensnow correctly handles functions with return type annotation (#2265) - [bugfix]
prefer-function-over-methodexclude overload signatures (#2315) - [bugfix]
use-isnannow applies only to comparison operators (#2317) - [bugfix]
file-header-rulenow handles single-line comments correctly (#2320) - [bugfix]
newline-before-return: fix handling of blank lines between comments (#2321) - [bugfix]
trailing-commaNo longer enforce trailing commas in type parameters and tuple types (#2236) - [bugfix]
aligndon't fix if it would remove code (#2379) - [bugfix]
unified-signaturesnow recognizes rest parameters (#2342) - [bugfix]
no-inferrable-typesdon't warn for inferrable type on readonly property (#2312) - [bugfix]
trailing-commano longer crashes on new without parentheses (e.g.new Foo) (#2389) - [bugfix]
semicolonIgnore comments when checking for unnecessary semicolon (#2240) - [bugfix]
semicolonDon't report unnecessary semicolon when followed by regex literal (#2240) - [bugfix] CLI: exit with 0 on type check errors when
--forceis specified (#2322) - [bugfix] CLI:
--testnow correctly strips single quotes from patterns on windows (#2322) - [bugfix]
prefer-constonly fix initialized variables (#2219) - [bugfix]
prefer-constcorrectly handle variables shadowed by parameters and catched exceptions (#2219) - [bugfix]
prefer-constdon't warn if one variable in a for loop initializer can not be const (#2219) - [bugfix]
prefer-consthandle more cases in destructuring (#2219) - [bugfix]
no-unused-expressionallow comma separated assignments (#2269) - [chore] removed update-notifier dependency (#2262)
- [development] allow rule tests to specify version requirement for typescript (#2323)
- [enhancement]
ignore-propertiesoption ofno-inferrable-typesnow also ignores parameter properties (#2312) - [enhancement]
unified-signaturesnow displays line number of the overload to unify if there are more than 2 overloads (#2270) - [enhancement]
trailing-commaNew checks for CallSignature and NamedExports (#2236) - [enhancement]
semicolonNew check for export statements, function overloads and shorthand module declaration (#2240) - [enhancement]
semicolonReport unnecessary semicolons in classes and in statement position (for option "always" too) (#2240) - [enhancement]
semicoloncheck for semicolon after method overload (#2240) - [enhancement]
array-typenow considerobject,undefinedandneveras simple types, allowingobject,undefined[]andnever[](#1843)(#2353) - [enhancement]
aligncheck statement alignment for all blocks (#2379) - [enhancement]
aligncheck parameter alignment for all signatures (#2379) - [enhancement]
--testcan handle multiple paths at once (#2322) - [enhancement]
only-arrow-functionsallow functions that usethisin the body (#2229) - [enhancement] CLI: print error when
--type-checkis used without--project(#2322) - [enhancement] CLI: don't print stack trace on type check error (#2322)
- [enhancement] CLI: added
-pas shorthand for--projectto be consistent withtsc(#2322) - [enhancement]
prefer-constshow warnings forvar(#2219) - [enhancement]
quotemarkfixer unescapes original quotemark (e.g.'\''->"'") (#2359) - [enhancement]
no-unused-expressionallow indirect eval(0, eval)("");(#2269) - [enhancement]
no-unused-expressionchecking for unused new can now use optionallow-fast-null-checks(#2269) - [enhancement]
no-unused-expressionfind unused comma separated expressions in all locations of the code (#2269) - [enhancement]
no-unused-expressionfind unused expressions inside void expression (#2269) - [new-config-option] Adds
defaultSeveritywith optionserror,warning, andoff. (#2416) - [new-formatter] TAP formatter (#2325)
- [new-rule-option]
no-unused-expressionadds optionallow-tagged-templateto allow tagged templates for side effects (#2269) - [new-rule-option]
no-unused-expressionadds optionallow-newto allownewwithout using the new object (#2269) - [new-rule-option]
member-accessaddsno-publicoption (#2247) - [new-rule-option]
curlyadded optionignore-same-line(#2334) - [new-rule-option]
{destructuring: "all"}to only warn if all variables in a destructuring can be const (#2219) - [new-rule-option] added
ignore-template-stringstono-trailing-whitespace(#2359) - [rule-update]
array-typenow considerundefinedandneveras simple types, allowingundefined[]andnever[](#1843)
Thanks to our contributors!
- Brian Olore
- Andy Hanson
- @andy-ms
- Chris Barr
- Klaus Meinhardt
- @bumbleblym
- Josh Goldberg
- James Clark
- @vilic
- Aleksandr Filatov
- Matt Banz
- Karol Janyst
- Mike Deverell
- Alexander James Phillips
- Irfan Hudda
v4.5.1
- [enhancement] Updated recommended rules to include
ban-typesandno-duplicate-super(#2271) - [bugfix]
object-literal-key-quoteshandle negative number property name (#2273)
v4.5.0
- [new-rule]
no-import-side-effect(#2155) - [new-rule]
match-default-export-name(#2117) - [new-rule]
no-non-null-assertion(#2221) - [new-rule]
ban-types(#2175) - [new-rule]
no-duplicate-super(#2038) - [new-rule]
newline-before-return(#2173) - [new-rule-option]
completed-docsadds options for location, type, and privacy. Also adds interfaces, enums, types (#2095) - [new-rule-option]
no-inferrable-typesadds optionignore-properties(#2178) - [new-rule-option]
typedefadds optionsobject-destructuringandarray-destructuringoptions (#2146) - [new-rule-option]
member-orderingadds optionalphabetize(#2101) - [new-rule-option]
no-trailing-whitespaceadds optionignore-jsdoc(#2177) - [new-rule-option]
no-trailing-whitespaceadds optionignore-commentsoption (#2153) - [new-fixer]
no-inferrable-typesautomatically remove inferrable type annotations (#2178) - [new-fixer]
no-any(#2165) - [new-fixer]
noConsecutiveBlankLines(#2201) - [new-fixer]
object-literal-shorthand(#2165) - [bugfix]
no-switch-case-fallthroughhandle break, throw, continue and return nested in block, if-else and switch (#2218) - [bugfix]
no-switch-case-fallthroughallow empty case clauses before default clause (#2218) - [bugfix]
no-mergeable-namespaceignore property types that can't be merged (#2105) - [bugfix]
object-literal-key-quotesno need to quote a float if its .toString() is the same. (#2144) - [bugfix]
no-consecutive-blank-linesCorrectly apply fixes at EOF (#2239) - [bugfix]: Fixes installation issue with node 7.5 (#2212)
- [bugfix]:
quotemarknow handles escaped chars (#2224) - [enhancement] Don't exit when a rule requires type checking but type checking is not enabled (#2188)
- [enhancement]
no-switch-case-fallthroughallow single line comment// falls through(#2218) - [enhancement]
no-unbound-methodallows property access and binary expressions (#2143) - [api] Introduce
AbstractWalkerfor performance (#2093)- see performance and migration docs
Thanks to our contributors!
- Andy Hanson
- Stefan Reichel
- Shlomi Assaf
- Josh Goldberg
- Minko Gechev
- Irfan Hudda
- Klaus Meinhardt
- Martin Probst
- Naoto Usuyama
- Caleb Eggensperger
- Arturs Vonda
- Joscha Feth
- Moritz
- Alexander Rusakov
- Alex Ryan
- Andy
- Yuichi Nukiyama
v4.4.2
- [bugfix]
whitespacerule caused false positive on EOF (#2131) - [bugfix] WebStorm fails because
jsonformatter parameter has extra space (#2132)
v4.4.1
- [bugfix] errant space in recommended ruleset (couldn't find
no-misused-new)
v4.4.0
- [new-rule]
arrow-return-shorthand(#1972) - [new-rule]
no-unbound-method(#2089) - [new-rule]
no-boolean-literal-compare(#2013) - [new-rule]
no-unsafe-any(#2047) - [new-rule]
no-unnecessary-qualifier(#2008) - [new-rule]
no-unnecessary-initializer(#2106) - [new-rule]
await-promise(#2102) - [new-rule]
no-floating-promises(#1632) - [new-rule]
strict-type-predicates(#2046) - [new-rule]
no-misused-new(#1963) - [new-rule]
prefer-method-signature(#2028) - [new-rule]
prefer-function-over-method(#2037) - [new-rule-option]
allow-fast-null-checksadded tono-unused-expression(#1638) - [new-rule-option]
comment-format-ruleaddsignore-wordsandignore-patternoptions (#1757) - [new-rule-option]
whitespaceaddscheck-preblockoption (#2002) - [new-rule-option]
strict-boolean-expressionsaddsallow-null-union,allow-undefined-union,allow-string, andallow-numberand (#2033) - [new-fixer]
align(#2097) - [new-fixer]
no-trailing-whitespace(#2060) - [bugfix]
no-magic-numbersfalse positive on default parameter values (#2004) - [bugfix]
no-empty-interfaceallow empty interface with 2 or more parents (#2070) - [bugfix]
no-trailing-whitespacefixed for comments and EOF (#2060) - [bugfix]
no-emptyno longer fails for private or protected constructor (#1976) - [bugfix]
tslint:disable/tslint-enablenow handles multiple rules and fixes what code is enabled/disabled (#2061) - [bugfix]
no-inferrable-typesnow validates property declarations (#2081) - [bugfix]
unified-signaturesfalse positive (#2016) - [bugfix]
whitespacefinds all whitespace errors in JsxExpressions and TemplateExpressions (#2036) - [bugfix]
comment-formatno more false positives in JsxText (#2036) - [enhancement]
--testoption now accepts glob (#2079)
Thanks to our contributors!
- Alexander Rusakov
- Andrii Dieiev
- @andy-ms
- Andy Hanson
- Josh Goldberg
- Kei Son
- Klaus Meinhardt
- Krati Ahuja
- Martin Probst
- Mohsen Azimi
- Romke van der Meulen
- cameron-mcateer
v4.3.1
- [bugfix] Fix back-compat break. Allow formattersDirectory === null (#1997)
v4.3.0
- Enabled additional rules in
tslint:latestconfiguration (#1981) - [new-rule]
space-before-function-paren(#1897) - [new-rule]
typeof-compare(#1927) - [new-rule]
import-spacing(#1935) - [new-rule]
unified-signatures(#1944) - [new-fixer]
object-literal-key-quotes(#1953) - [new-fixer]
no-angle-bracket-type-assertion(#1979) - [bugfix]
adjacent-overload-signaturenow handles static/computed function names (#1831) - [bugfix]
file-headernow handles files with only comments (#1913) - [bugfix]
no-consecutive-blank-linesnow allows blank lines in template strings (#1886) - [bugfix]
object-literal-key-quotesno longer throws exception when using rest operator (#1916) - [bugfix]
restrict-plus-operandsno longer shows false positive in ternary operation (#1925) - [bugfix]
prefer-for-ofnow handles nestedforloops with reused iterator (#1926) - [bugfix] Exit gracefully when
tsconfig.jsonpassed as--projectargument doens't have files (#1933) - [bugfix]
object-literal-key-quotesnow handles shorthand and spread properties (#1945) - [bugfix]
arrow-parensAllow binding patterns([x, y]) => ...and({x, y}) => ...to have parens (#1958) - [bugfix]
semicolonfixer now handles comma separator in interfaces and indicates failure when commas are using in interfaces (#1856) - [bugfix]
only-arrow-functionsoptionallow-named-functionsnow allows function declarations (#1961) - [bugfix]
prefer-for-ofno longer shows false positive when array is in parentheses (#1986) - [bugfix]
prefer-constnow works for TypeScript versions < 2.1.0 (#1989) - [enhancement]
member-accessnarrow location of error (#1964)
Thanks to our contributors!
- Andrii Dieiev
- @andy-ms
- Andy Hanson
- Josh Goldberg
- Klaus Meinhardt
- Linda_pp
- Mohsen Azimi
- Victor Grigoriu
- Yuichi Nukiyama
- cameron-mcateer
v4.2.0
- [new-rule]
no-string-throw(#1878) - [new-rule]
no-empty-interface(#1889) - [new-rule]
interface-over-type-literal(#1890) - [new-rule]
callable-types(#1891) - [new-rule]
no-void-expression(#1903) - [new-rule-option]
ban-single-arg-parensadded toarrow-parens(#1893) - [bugfix]
prefer-consthandles destructuring arrays (#1894), destructuring objects (#1906), and forward references (#1908) - [bugfix] Don't error for misplaced braces for 'else' in
one-linerule (#1866) - [bugfix]
no-shadowed-variablenow identifies shadowedforiterator (#1816) - [bugfix]
object-literal-key-quotesnow includes function names (#1874) - [bugfix] error when EOF comes after
disable-next-linecomment (#1902)
Thanks to our contributors!
- Andrew Scott
- @andy-ms
- Andy Hanson
- James Booth
- Klaus Meinhardt
- Vladimir Matveev
v4.1.1
- [bugfix]
typedefrule was showing false positive forcatchclause (#1887)
v4.1.0
- [new-rule]
prefer-const(#1801) - [new-rule]
strict-boolean-expressions(#1820) - [new-rule]
no-magic-numbers(#1799) - [new-rule]
import-blacklist(#1841) - [new-rule]
promise-functions-async(#1779) - [new-rule]
no-inferred-empty-object-type: a type must be specified when using a generic class/function/etc (#1821) - [new-rule-option]
allow-named-functionsadded toonly-arrow-functions(#1857) - [new-fixer]
prefer-const(#1801) - [new-fixer]
quotemark(#1790) - [new-formatter]
code-frameformatter shows you the error in context (#1819) - [enhancement]
no-internal-modulefailures highlight less text (#1781) - [enhancement] Avoid auto-fixing errors that would result in compilation errors for rules that use type-check (#1608)
- [rule-change]
only-arrow-functionswill allow functions with athisparameter (#1597) - [bugfix]
no-use-before-declarefalse positive on named import (#1620) - [bugfix]
prefer-for-ofwas showing false positive when the element is assigned (#1813) - [bugfix] The command line argument
type-checkwas swallowing the next argument (#1783) - [bugfix]
tslint:disable-linewas re-enablingtslint:disable(#1634) - [bugfix]
adjacent-overload-signaturesdid not work for constructors (#1800) - [bugfix]
checkstyleformatter was reporting errors under one file (#1811) - [bugfix]
trailing-commawas applied to parameter lists (#1775) - [api] CLI logic moved into API friendly class (#1688)
Thanks to our contributors!
- Alex Eagle
- Andrii Dieiev
- Andy Hanson
- Art Chaidarun
- Donald Pipowitch
- Feisal Ahmad
- Josh Goldberg
- Klaus Meinhardt
- Maciej Sypień
- Mohsen Azimi
- Ryan Lester
- Simon Schick
- Subhash Sharma
- Timothy Slatcher
- Yaroslav Admin
- Yuichi Nukiyama
- tdsmithATabc
- @wmrowan
v4.0.2
- [enhancement] Don't exit when a rule can't be found. Print as a warning instead (#1771)
- [api-change] Allow 3rd party apps to see exception when the config is invalid (#1764)
- [bugfix] Don't flag a property named as empty string as not needing quotes in an object literal (#1762)
- [bugfix] Report correct number of fixes done by --fix (#1767)
- [bugfix] Fix false positives and exceptions in
prefer-for-of(#1758) - [bugfix] Fix
adjacent-overload-signaturesfalse positive when a static function has the same name (#1772)
Thanks to our contributors!
- @gustavderdrache
v4.0.1
- [bugfix] Removed
no-unused-variablerule from recommended config, as it was causing spurious deprecation warnings.
v4.0.0-dev.2
- Include latest v4.0.0 changes
v4.0.0
- BREAKING CHANGES
- [api-change] Minor changes to the library API. See this PR for changes and upgrade instructions (#1720)
- [removed-rule] Removed
no-unreachablerule; covered by compiler (#661) - [enhancement] Changed order of applied configuration files for the
extendsarray to make it more intuitive. (#1503) - [enhancement] Changed TypeScript peer dependency to >= 2.0.0 (#1710)
- [new-rule]
completed-docsrule added (#1644) - [new-fixer]
ordered-importsauto fixed (#1640) - [new-fixer]
arrow-parensauto fixed (#1731) - [rule-change]
indentrule now ignores template strings (#1611) - [new-rule-option]
object-literal-key-quotesadds the optionsconsistentandconsistent-as-needed(#1733) - [enhancement]
--fixoption added to automatically fix selected rules (#1697) - [enhancement] Updated recommend rules (#1717)
- [enhancement]
adjacent-overload-signaturesnow works with classes, source files, modules, and namespaces (#1707) - [enhancement] Users are notified if they are using an old TSLint version (#1696)
- [bugfix] Lint
.jsxfiles ifjsRulesare configured (#1714) - [bugfix] Command line glob patterns now handle single quotes (#1679)
Thanks to our contributors!
- Andrii Dieiev
- Andy
- Chris Barr
- Davie Schoots
- Jordan Hawker
- Josh Goldberg
- Stepan Riha
- Yuichi Nukiyama
v4.0.0-dev.1
- BREAKING CHANGES
- [enhancement] The
semicolonrule now disallows semicolons in multi-line bound class methods (to get the v3 behavior, use theignore-bound-class-methodsoption) (#1643) - [removed-rule] Removed
use-strictrule (#678) - [removed-rule] Removed
label-undefinedrule; covered by compiler (#1614) - [enhancement] Renamed
no-constructor-varstono-parameter-properties(#1296) - [rule-change] The
orderedImportsrule now sorts relative modules below non-relative modules (#1640)
- [enhancement] The
- Deprecated
- [deprecated]
no-unused-variablerule. This is checked by the TypeScript v2 compiler using the flags--noUnusedParametersand--noUnusedLocals. (#1481)
- [deprecated]
- [enhancement] Lint .js files (#1515)
- [new-fixer]
no-var-keywordreplacesvarwithlet(#1547) - [new-fixer]
trailing-commaauto fixed (#1546) - [new-fixer]
no-unused-variableauto fixed for imports (#1568) - [new-fixer]
semicolonauto fixed (#1423) - [new-rule]
max-classes-per-filerule added (#1666) - [new-rule-option]
no-consecutive-blank-linesrule now accepts a number value indicating max blank lines (#1650) - [new-rule-option]
ordered-importsrule optionimport-sources-orderaccepts valueany(#1602) - [bugfix]
no-emptyrule fixed when parameter has readonly modifier - [bugfix]
no-namespacerule: do not flag nested or .d.ts namespaces (#1571)
Thanks to our contributors!
- Alex Eagle
- Andrii Dieiev
- Ben Coveney
- Boris Aranovich
- Chris Barr
- Cyril Gandon
- Evgeniy Zhukovskiy
- Jay Anslow
- Kunal Marwaha
- Martin Probst
- Mingye Wang
- Raghav Katyal
- Sean Dawson
- Yuichi Nukiyama
- jakpaw
v4.0.0-dev.0
- BREAKING CHANGES
- [enhancement] Drop support for configuration via package.json (#1579)
- [removed-rule] Removed
no-duplicate-keyrule; covered by compiler (#1109) - [enhancement] Call formatter once for all file results. Format output may be different (#656)
- [rule-change]
trailing-commasupports function declarations, expressions, and types (#1486) - [rule-change]
object-literal-sort-keysnow sorts quoted keys (#1529) - [rule-change]
semicolonnow processes type aliases (#1475) - [rule-change]
no-var-keywordnow rejectsexport varstatements (#1256) - [rule-change]
semicolonnow requires semicolon for function declaration with no body (#1447)
- [new-formatter]
fileslistformatter writes a list of files with errors without position or error type specifics (#1558) - [new-rule]
cyclomaticComplexity, enforces a threshold of cyclomatic complexity.] (#1464) - [new-rule]
prefer-for-of, which errors whenfor(var x of y)can be used instead offor(var i = 0; i < y.length; i++)(#1335) - [new-rule]
array-type, which can require using either `T[]' or 'Array' for arrays (#1498) - [rule-change]
object-literal-sort-keyschecks multiline objects only (#1642) - [rule-change]
banrule now can ban global functions (#327) - [bugfix] always write lint result, even if using formatter (#1353)
- [bugfix] npm run test:bin fails on Windows (#1635)
- [bugfix] Don't enforce trailing spaces on newlines in typedef-whitespace rule (#1531)
- [bugfix]
jsdocrule should not match arbitrary comments (#1543) - [bugfix]
one-linerule errors when declaring wildcard ambient modules (#1425)
Thanks to our contributors!
- Alex Eagle
- Andrii Dieiev
- Andy Hanson
- Ben Coveney
- Boris Aranovich
- Chris Barr
- Christian Dreher
- Claas Augner
- Josh Goldberg
- Martin Probst
- Mike Deverell
- Nina Hartmann
- Satoshi Amemiya
- Scott Wu
- Steve Van Opstal
- Umar Bolatov
- Vladimir Matveev
- Yui
v3.15.1
- Enabled additional rules in
tslint:latestconfiguration (#1506)
v3.15.0
- Stable release containing changes from the last dev release (v3.15.0-dev.0)
v3.15.0-dev.0
- [enhancement] Rules can automatically fix errors (#1423)
- [enhancement] Better error messages for invalid source files (#1480)
- [new-rule]
adjacent-overload-signaturesrule (#1426) - [new-rule]
file-headerrule (#1441) - [new-rule]
object-literal-shorthandrule (#1488) - [new-rule-option]
allow-declarationsoption foronly-arrow-functionsrule (#1452) - [new-rule-option]
import-sources-orderoption forordered-importsrule (#1466) - [bugfix]
arrow-parensrule handles async and generics (#1446, #1479) - [bugfix]
comment-formatrule ignores tslint control comments (#1473) - [bugfix] Fix
no-shadowed-variablerule false positives (#1482)
Thanks to our contributors!
- @apacala
- @danvk
- @DovydasNavickas
- @glen-84
- @IllusionMH
- @JoshuaKGoldberg
- @markwongsk
- @rakatyal
- @rhysd
- @ScottSWu
- @YuichiNukiyama
v3.14.0
- Stable release containing changes from the last dev releases (v3.14.0-dev.0, v3.14.0-dev.1)
v3.14.0-dev.1
- [new-rule]
arrow-parensrule (#777) - [new-rule]
max-file-line-countrule (#1360) - [new-rule]
no-unsafe-finallyrule (#1349) - [new-rule]
no-for-in-arrayrule (#1380) - [new-rule]
object-literal-key-quotesrule (#1364) - [enhancement] Better
banrule failure messages (#1385) - [enhancement] New stylish formatter (#1406)
Thanks to our contributors!
- @chrismbarr
- @danvk
- @gjuchault
- @lowkay
- @ScottSWu
- @YuichiNukiyama
v3.14.0-dev.0
- [enhancement] Add optional type information to rules (#1323)
Thanks to our contributors!
- @ScottSWu
v3.13.0
- Stable release containing changes from the last dev release (v3.13.0-dev.0)
v3.13.0-dev.0
- [new-rule]
ordered-importsrule (#1325) - [enhancement] MPEG transport stream files are ignored by the CLI (#1357)
Thanks to our contributors!
- @chrismbarr
- @corydeppen
- @danvk
- @janaagaard75
- @mprobst
v3.12.0-dev.2
- [enhancement] Support TypeScript v2.0.0-dev builds
v3.12.1
- Stable release containing changes from the last dev release (v3.12.0-dev.1)
v3.12.0-dev.1
- [bugfix] Fix null reference bug in typedef rule (#1345)
v3.12.0
- Stable release containing changes from the last dev release (v3.12.0-dev.0)
v3.12.0-dev.0
- [new-rule]
only-arrow-functionsrule (#1318) - [new-rule]
no-unused-newrule (#1316) - [new-rule-option]
arrow-call-signatureoption fortypedefrule (#1284) - [enhancement] Metadata for every rule (#1311)
- [enhancement]
typedefrule is more flexible about the location of typedefs for arrow functions (#1176) - [enhancement] Failure messages are clearer and more consistent for many rules (#1303, #1307, #1309)
- [bugfix]
no-consecutive-blank-linesnow handles lines with only whitespace correctly (#1249) - [bugfix] Correctly load
.jsonconfig files that have a BOM (#1338)
Thanks to our contributors!
- @allannienhuis
- @arnaudvalle
- @bencoveney
- @chrismbarr
- @corydeppen
- @HamletDRC
- @JoshuaKGoldberg
- @timbrown81
- @tomduncalf
- @YuichiNukiyama
v3.11.0
- Stable release containing changes from the last dev release (v3.11.0-dev.0)
v3.11.0-dev.0
- [new-rule]
linebreak-stylerule (#123) - [new-rule]
no-mergeable-namespacerule (#843) - [enhancement] Add built-in configurations (#1261)
- [enhancement] New vso formatter (#1281)
- [new-rule-option]
ignore-interfacesoption forsemicolonrule (#1233) - [bugfix]
no-default-exportrule handles more default export cases (#1241)
Thanks to our contributors!
- @cgwrench
- @HamletDRC
- @lijunle
- @paldepind
- @patsissons
- @schmuli
- @YuichiNukiyama
v3.10.2
- Stable release containing changes from the last dev release (v3.10.0-dev.2)
v3.10.0-dev.2
- [bugfix]
member-orderingrule doesn't crash on methods in class expressions (#1252) - [bugfix]
banrule handles chained methods appropriately (#1234)
Thanks to our contributors!
- @marines
v3.10.1
- Stable release containing changes from the last dev release (v3.10.0-dev.1)
v3.10.0-dev.1
- [bugfix]
member-orderingrule doesn't crash on methods in object literals (#1243)
v3.10.0
- Stable release containing changes from the last dev release (v3.10.0-dev.0)
v3.10.0-dev.0
- [new-rule]
new-parensrule (#1177) - [new-rule]
no-default-exportrule (#1182) - [new-rule-option]
order: ...option formember-orderingrule (#1208) - [new-rule-option] "ignore-for-loop" option for
one-variable-per-declarationrule (#1204) - [enhancement] "no-this-in-function-in-method" option renamed to "check-function-in-method" (#1203)
- [bugfix]
semicolonrule checks export statements (#1155)
Thanks to our contributors!
- @chrismbarr
- @HamletDRC
- @larshp
- @patsissons
- @YuichiNukiyama
v3.9.0
- Stable release containing changes from the last dev release (v3.9.0-dev.0)
v3.9.0-dev.0
- [new-rule]
no-namespacerule (#1133) - [new-rule]
one-variable-per-declarationrule (#525) - [new-rule-option] "ignore-params" option for
no-inferrable-typesrule (#1190) - [new-rule-option] "no-this-in-function-in-method" option for
no-invalid-thisrule (#1179) - [enhancement] Single line enable/disable comments (#144)
- [enhancement] Resolve
extendspackages relative to location of configuration file (#1171) - [enhancement]
Linterclass will throw an error if configuration is of an invalid type (#1167) - [bugfix]
use-isnanallows assaignments toNaN(#1054) - [bugfix]
no-unreachablehandles allows hoisted type aliases (#564) - [bugfix]
member-orderingrule now checks constructors (#1158) - [bugfix]
--testCLI command works correctly with specifiying custom rules (#1195)
Thanks to our contributors!
- @abierbaum
- @HamletDRC
- @inthemill
- @janslow
- @JoshuaKGoldberg
- @mprobst
- @patsissions
- @YuichiNukiyama
v3.8.1
- Stable release containing changes from the last dev release (v3.8.0-dev.1)
v3.8.0-dev.1
- [bugfix] Allow JS directives at the start of constructors, getters, and setters (#1159)
- [bugfix] Remove accidentally included performance profiles from published NPM artifact (#1160)
v3.8.0
- Stable release containing changes from the last dev release (v3.8.0-dev.0)
v3.8.0-dev.0
- [new-rule]
no-invalid-thisrule (#1105) - [new-rule]
use-isnanrule (#1054) - [new-rule]
no-referencerule (#1139) - [new-rule-option] "allow-pascal-case" option for
variable-namerule (#1079) - [enhancement] Comments now allowed in
tslint.jsonfiles (#1129) - [enhancement] Smarter
trailing-commabehavior (#1122) - [enhancement]
semicolonrule more lenient with arrow-function class members (#1076) - [enhancement] Allow enabling/disabling rules with
//comments (#1134) - [enhancement] New checkstyle formatter (#250)
- [enhancement] Clearer message for
no-var-keywordrule (#1124) - [bugfix] Loaded configurations are not cached (#1128)
- [bugfix] Allow JS directives at the start of class methods (#1144)
Thanks to our contributors!
- @AndyMoreland
- @chrismbarr
- @HamletDRC
- @JoshuaKGoldberg
- @sshev
- @unional
v3.7.4
- Stable release containing changes from the last dev release (v3.7.0-dev.5)
v3.7.0-dev.5
- [bugfix] Allow JS directives in namespaces (#1115)
v3.7.3
- Stable release containing changes from the last dev release (v3.7.0-dev.4)
v3.7.0-dev.4
- [bugfix] Downgrade
findup-syncdependency (#1108)
v3.7.2
- Stable release containing changes from the last dev release (v3.7.0-dev.3)
v3.7.0-dev.3
- [bugfix]
findConfigurationPathalways returns an absolute path (#1093) - [bugfix] Update
findup-syncdependency (#1080) - [bugfix]
declare globalno longer triggersno-internal-modulerule (#1069) - [bugfix] Valid JS directives no longer trigger
no-unused-expressionrule (#1050)
v3.7.1
- Stable release containing changes from the last dev release
v3.7.0-dev.2
- [bugfix] Improve handling of paths provided via the -c CLI option (#1083)
v3.7.0
- Stable release containing changes from the last dev release
v3.7.0-dev.1
- [enhancement]
extendsfield fortslint.jsonfiles (#997) - [enhancement]
--forceCLI option (#1059) - [enhancement] Improve how
Linterclass handles configurations with arulesDirectoryfield (#1035) - [new-rule]
no-angle-bracket-type-assertionrule (#639) - [new-rule-option] "allow-undefined-check" option for
triple-equalsrule (#602) - [new-rule-option] "always-prefix" and "never-prefix" option for
interface-namerule (#512)
Thanks to our contributors!
- @Arnavion
- @chrismbarr
- @ChrisPearce
- @JoshuaKGoldberg
- @patsissonso
- @sasidhar
- @unional
- @vvakame
v3.6.0
- Stable release containing changes from the last dev release
v3.6.0-dev.1
- [enhancement] Add
--excludeCLI option (#915) - [bugfix] Fix
no-shadowed-variablerule handling of standalone blocks (#1021) - [deprecation] Configuration through
package.jsonfiles (#1020) - [API] Export additional configuration methods from top-level "tslint" module (#1009)
Thanks to our contributors!
- @blakeembrey
- @hamhut1066
- @meowtec
v3.5.0
- Stable release containing changes from the last dev release
v3.5.0-dev.1
- [new-rule-option] "ignore-pattern" option for
no-unused-variablerule (#314) - [bugfix] Fix occassional crash in
no-string-literalrule (#906) - [enhancement] Tweak behavior of
member-orderingrule with regards to arrow function types in interfaces (#226)
Thanks to our contributors!
- @arusakov
- @Pajn
v3.4.0
- Stable release containing changes from the last two dev releases
v3.4.0-dev.2
- [new-rule-option] "arrow-parameter" option for
typedefrule (#333) - [new-rule-option] "never" option for
semicolonrule (#363) - [new-rule-option] "onespace" setting for
typedef-whitespacerule (#888) - [new-rule-option]
typedef-whitespacerule can now check spacing on right side of typdef colon (#888) - [enhancement]
member-orderingrule treats arrow functions as methods (#226) - [bugfix] Handle spaces before typedefs correctly in
typedef-whitespacerule (#955) - [bugfix]
label-positionrule now allows labels onfor-ofloops (#959)
Thanks to our contributors!
- @b0r3as
- @ChaseMoskal
- @Pajn
- @pe8ter
- @tomduncalf
v3.4.0-dev.1
- [enhancement] Revamped testing system (#620)
- Writing tests for rules is now much simpler with a linter DSL.
See exisitng tests in
test/rules/**/*.ts.lintfor examples.
- Writing tests for rules is now much simpler with a linter DSL.
See exisitng tests in
- [enhancement] New msbuild formatter (#947)
- [bugfix] Fix handling of multiline literals in
trailing-commarule (#856) - [bugfix]
one-linerule correctly checks space betweencatchand opening brace (#925) - [bugfix]
one-linerule correctly checks multiline variable declarations (#935) - [new-rule-option] New option
check-finallyforone-linerule (#925) - BREAKING CHANGES
- [bugfix] Report error when a rule in the config file is not found (#598)
Thanks to our contributors!
- @mmv
- @pe8ter
v3.3.0
- [bugfix] Tweak TSLint build so TSLint works with typescript@next (#926)
v3.3.0-dev.1
- [bugfix] Correctly handle more than one custom rules directory (#928)
v3.2.2
- Stable release containing changes from the last dev release
v3.2.2-dev.1
- [enhancement] Throw an error if a path to a directory of custom rules is invalid (#910)
- [new-rule-option] "jsx-single" and "jsx-double" options for
quotemarkrule (#673) - [bugfix] Handle paths to directories of custom rules more accurately
- [bugfix]
no-unused-expressionrule handlesawaitstatements correctly (#887)
v3.2.1
- Stable release containing changes from the last dev release
v3.2.1-dev.1
- [enhancement] automatically generate a
tslint.jsonfile with new--initCLI command (#717) - [bugfix]
no-var-keywordrule detects the use ofvarin all types offorloops (#855)
v3.2.0
- Stable release containing changes from last two dev releases
v3.2.0-dev.2
- [bugfix] formatters are now exported correctly to work with TS 1.8 (#863)
v3.2.0-dev.1
- [bugfix] fixed bug in how custom rules directories are registered (#844)
- [enhancement] better support for globs in CLI (#827)
- [new-rule]
no-null-keywordrule (#722)
v3.1.1
- Bump TypeScript peer dependency to
>= 1.7.3due toconst enumincompatibility (#832)
v3.1.0
- [bugfix] build with TS v1.7.3 to fix null pointer exception (#832)
- [bugfix] fixed false positive in
no-require-importsrule (#816)
v3.1.0-dev.1
- [bugfix] fixed
no-shadowed-variablefalse positives when handling destructuring in function params (#727) - [enhancement]
rulesDirectoryintslint.jsonnow supports multiple file paths (#795)
v3.0.0
- [bugfix]
member-accessrule now handles object literals and get/set accessors properly (#801)- New rule options:
check-accessorandcheck-constructor
- New rule options:
- All the changes from the following releases, including some breaking changes:
3.0.0-dev.33.0.0-dev.23.0.0-dev.12.6.0-dev.22.6.0-dev.1
v3.0.0-dev.3
- TypeScript is now a peerDependency (#791)
- [bugfix]
no-unused-variablerule withreactoption works with self-closing JSX tags (#776) - [bugfix]
use-strictbugfix (#544)
v3.0.0-dev.2
- [new-rule-option] "react" option for
no-unused-variablerule (#698, #725) - [bugfix] Fix how
Linteris exported from "tslint" module (#760) - [bugfix]
no-use-before-declarerule doesn't crash on uncompilable code (#763)
v3.0.0-dev.1
- BREAKING CHANGES
- Rearchitect TSLint to use external modules instead of merged namespaces (#726)
- Dependencies need to be handled differently now by custom rules and formatters
- See the PR for full details about this change
no-trailing-commarule removed, it is replaced by thetrailing-commarule (#687)- Rename
sort-object-literal-keysrule toobject-literal-sort-keys(#304, #537) Lint.abstract()has been removed (#700)
- Rearchitect TSLint to use external modules instead of merged namespaces (#726)
- [new-rule]
trailing-commarule (#557, #687) - [new-rule-option] "ban-keywords" option for
variable-namerule (#735, #748) - [bugfix]
typedefrule now handlesfor-ofloops correctly (#743) - [bugfix] Handle tslint.json utf-8 files which have a BOM correctly (#90)
v2.6.0-dev.2
- Upgrade TypeScript compiler to
v1.7.0-dev.20151003 - [bugfix]
no-unused-expressionrule now handles yield expressions properly (#706)
v2.6.0-dev.1
- Upgrade TypeScript compiler to
v1.7.0-dev.20150924
v2.5.1
- [new-rule] no-inferrable-types rule (#676)
- [new-rule-option] "avoid-escape" option for quotemark rule (#543)
- [bugfix] type declaration for tslint external module #686
- [enhancement]
AbstractRuleandAbstractFormatterare now abstract classes (#631)- Note:
Lint.abstract()is now deprecated
- Note:
v2.5.0
- Use TypeScript compiler
v1.6.2 - [bugfixes] #637, #642, #650, #652
- [bugfixes] fix various false positives in
no-unused-variablerule (#570, #613, #663) - Update project setup for latest VSCode (#662)
v2.5.0-beta
- Use TypeScript compiler
v1.6.0-beta - [bugfix] Fix
no-internal-modulefalse positives on nested namespaces (#600) - [docs] Add documentation for
sort-object-literal-keysrule
v2.5.0-dev.5
- Upgrade TypeScript compiler to
v1.7.0-dev.20150828 - [bugfix] Handle .tsx files appropriately (#597, #558)
v2.5.0-dev.4
- Upgrade TypeScript compiler to
v1.6.0-dev.20150825
v2.5.0-dev.3
- Upgrade TypeScript compiler to
v1.6.0-dev.20150821
v2.5.0-dev.2
- Upgrade TypeScript compiler to
v1.6.0-dev.20150811 - [bug] fix
whitespacefalse positive in JSX elements (#559)
v2.5.0-dev.1
- Upgrade TypeScript compiler to
v1.6.0-dev.20150805 - [enhancement] Support
.tsxsyntax (#490)
v2.4.5
- [bugfix] fix false positives on
no-shadowed-variablerule (#500) - [enhancement] add
allow-trailing-underscoreoption tovariable-namerule
v2.4.4
- [bugfix] remove "typescript" block from package.json (#606)
v2.4.3
- [new-rule]
no-conditional-assignment(#507) - [new-rule]
member-access(#552) - [new-rule]
no-internal-module(#513) - [bugfix] small fixes to
sample.tslint.json(#545) - [bugfix] fix README docs for quotemark and indent (#523)
- [enhancement] update
findup-syncandunderscore.stringdependencies - [enhancement] add
"typescript"field topackage.json(#560) - [enhancement] small improvements to CLI help text
- [enhancement] expose raw failures array in the JS API (#477)
v2.4.2
- [bug] remove npm-shrinkwrap.json from the published package
v2.4.0
- Upgraded Typescript compiler to 1.5.3
- [bugs] #332, #493, #509, #483
- [bug] fix error message in
no-var-keywordrule - [enhancement] CI tests are now run on node v0.12 in addition to v0.10
- BREAKING
-foption removed from CLI
v2.3.1-beta
- [bugs] #137 #434 #451 #456
- [new-rule]
no-require-importsdisallowsrequire()style imports - [new-rule]
no-shadowed-variablemoves over shadowed variable checking fromno-duplicate-variableinto its own rule - BREAKING
no-duplicate-variablenow only checks for duplicates within the same block scope; enableno-shadowed-variableto get duplicate-variable checking across block scopes
- [enhancement]
no-duplicate-variable,no-shadowed-variable, andno-use-before-declarenow support ES6 destructuring - [enhancement] tslint CLI now uses a default configuration if no config file is found
v2.3.0-beta
- [bugs] #401 #367 #324 #352
- [new-rule]
no-var-keyworddisallowsvarin favor ofletandconst - [new-rule]
sort-object-literal-keysforces object-literal keys to be sorted alphabetically - Add support for ES6 destructuring and module syntax (affects
variable-name,no-use-before-declare,whitespaceandno-unused-variable) - Add support for ES6 for-of and spread operator syntax
- Use tsconfig.json & JSCS in the build system
v2.2.0-beta
- Upgraded Typescript compiler to 1.5.0-beta
- BREAKING CHANGES
- due to changes to the typescript compiler API, old custom rules may no longer work and may need to be rewritten
- the JSON formatter's line and character positions are now back to being 0-indexed instead of 1-indexed
- [bugs] #328 #334 #319 #351 #365 #254
- [bug] fixes for tslint behavior around template strings (fixes #357, #349, #332, and more)
- [new-rule]
alignrule now enforces vertical alignment on parameters, arguments, and statements - [new-rule]
switch-defaultenforces adefaultcase inswitchstatements - [feature]
no-duplicate-variablerule now additionally checks if function parameters have been shadowed - Additional fixes to existing rules to work as before with the typescript 1.5 compiler
v2.1.1
- [bugs] #292 #293 #295 #301 #302
- Some internal refactoring
- Added Windows CI testing (appveyor)
v2.1.0
- Fix crash on Windows
v2.0.1
- Upgraded Typescript compiler to 1.4
- BREAKING CHANGES
- typedef rule options were modified:
- index-signature removed as no longer necessary
- property-signature renamed to property-declaration
- variable-declarator renamed to variable-declaration
- member-variable-declarator renamed to member-variable-declaration
- typedef-whitespace rule options were modified:
- catch-clause was removed as invalid
- further options were added, see readme for more details
- due to changes to the typescript compiler API, old custom rules may no longer work and may need to be rewritten
- the JSON formatter's line and character positions are now 1-indexed instead of 0-indexed
- typedef rule options were modified:
v1.2.0
- [bug] #245
v1.0.1
- [bug] #238
v1.0.0
- upgrade TypeScript compiler to 1.3
- BREAKING CHANGES
- all error messages now start with a lower-case character and do not end with a period
- all rule options are consistent in nomenclature. The
typedefandtypedef-whitespacerules now take in hyphenated options unused-variablesrule cannot find unused private variables defined in the constructor due to a bug in 1.3 compilerindentrule has changed to only check for tabs or spaces and not enforce indentation levels
v0.4.12
- multiple files with -f on cli
- config file search starts with input file
v0.4.11
- [bugs] #136, #163
- internal refactors
v0.4.10
- [bugs] #138, #145, #146, #148
v0.4.9
- [new-rule]
no-anydisallows all uses ofany - [bug]
/* tslint:disable */now disables semicolon rule as well - [bug] delete operator no longer results in a false positive for
no-unused-expression
v0.4.8
- [new-rule]
no-var-requiresdisallows require statements not part of an import statement - [new-rule]
typedefrule also checks for member variables - [bug]
no-unused-variableno longer triggers false positives for class members labeled onlystatic - [bug]
no-unused-expressionno longer triggers false positives for"use strict";expressions - [bug]
use-strictworks correctly on function declarations - [bug] config file is now discoverable from other drives on Windows
v0.4.7
- [new-rule] added
no-unused-expressionrule which disallows unused expression statements - [feature] the
check-operatoroption for thewhitespacerule now checks whitespace around the => token - [bug]
no-use-before-declare-ruleno longer triggers false positives for member variables of classes used before the class is declared - [bug] semicolon at end of file no longer triggers false positives for
whitespacerule - [bug] hoisted functions no longer cause false positives for the
no-unreachablerule - [bug] the rule loader no longer transforms/ignores the leading and trailing underscores and dashes of rule names in the config file
- [bug]
export importstatements no longer false positives forno-unused-variable-rule - [docs] added documentation for creating custom rules and formatters
- [docs] added sample
tslint.jsonfile, underdocs/sample.tslint.json
v0.4.6
- [build] migrated build to use
grunt-tsinstead ofgrunt-typescript - [feature]
package.jsonnow contains atslintConfigparamater to allow users to specify the location of the configuration file there - [feature] tslint now searches for the configuration file in the user's home directory if not found in the current path
- [bug] unbraced conditionals no longer cause false positives for the
no-unreachablerule
v0.4.5
- [feature]
no-unused-variableno longer checks parameters by default. Parameters are now only checked if thecheck-parametersoption is set. - [bug]
no-unused-variableparameter check no longer fails on variable argument parameters (like ...args) and on cases where the parameters are broken up by newlines.
v0.4.4
- [bug]
no-unused-variablevalidates function parameters and constructor methods - [bug]
no-emptyandno-trailing-commarules handle empty objects
v0.4.3
- [new-rule]
no-unused-variable - [new-rule]
no-trailing-comma - [new-rule]
no-use-before-declare - [feature] support
--versionin CLI - [feature] expose rule names to custom formatters
- [feature] add
verboseformatter - [bug]
no-emptyallows constructors with member declaration parameters - [bug] CLI supports
--help - [bug]
max-line-lengthallows CRLF endings