Features:
naming-convention:accessoris now configurable
Bugfixes:
naming-convention:filteroption is no longer affect by the order of checked names and caching
Features:
no-unnecessary-elseandno-else-after-returnare now automatically fixable
Bugfixes:
- fixed version of
tsutilsdependency
Features:
early-exit: added option"ignore-constructor"
Bugfixes:
no-unused: don't mark import ofReactas unused if required by JsxFragment
Bugfixes:
no-unused: fixed crash on type parameter of declaration inside global augmentation
Bugfixes:
naming-convention: added missing configuration handling for"type": "parameterProperty"
Features:
no-else-after-return: added option"allow-else-if"
no-else-after-return: use correct control flow analysis
no-unnecessary-type-annotation: fix infinite loop on union with generic signature (#57)
Bugfixes:
no-unnecessary-type-annotationsnow recognizes IIFEs that look like(function(param: string) {}('parameter'));
Features:
This package now provides all rules for the Wotan linter runtime as well.
Example .wotanrc.yaml:
extends:
- tslint-consistent-codestyle # makes rules from the package available with the 'tcc/' prefix
rules: # now configure the rules you want to use, remember to use the 'tcc/' prefix
tcc/no-collapsible-if: error
tcc/no-unused:
options: 'ignore-parameters'Bugfixes:
ext-curly: handle LabeledStatement as if it was not present
Non-breaking rule changes: (you might want to amend your configuration to make the rules stricter again)
naming-convention: Format options"camelCase"and"PascalCase"now allow adjacent uppercase characters to make it usable for real-world code. Use the new options"strictCamelCase"and"StrictPascalCase"to restore the old strict behavior.no-unnecessary-type-annotation: disabled checking return type annotations by default as these cause the most false positves. You can enable the check with the new option"check-return-type".
Bugfixes:
naming-convention: fixed a bug where the suffix was not correctly removed from the name when using an array of suffixes.
Features:
naming-convention: added new type"functionVariable".- It matches all variables initialized with an arrow function or function expression.
- It inherits configuration from
"variable"
Bugfixes:
no-accessor-recursionfixed crash on abstract accessor
Bugfixes:
no-unusedadded special handling forReactimplicitly used by JSX
Bugfixes:
no-unnecessary-type-annotation- avoid infinite recursion for circular type parameters
- fix signature arity calculation
Features:
- new rule
no-accessor-recursion
Bugfixes:
no-unnecessary-type-annotation- choose correct signature by arity
- correctly handle methods with numeric name
- correctly handle methods with computed names
Bugfixes:
no-unnecessary-type-annotation- fixed a false positive with typeguard functions
- this rule is no longer considered experimental
Bugfixes:
no-unnecessary-type-annotation- check return types
- check types in IIFE (immediately invoked function expression)
- check object literal methods with contextual type
- exempt
thisparameters - correctly handle optional parameters
- correctly handle rest parameters
Features:
- new experimental rule
no-unnecessary-type-annotation naming-conventionaddsunusedmodifier -> this enables you to allow leading underscore only for unused variables and parametersno-var-before-returnadds option"allow-destructuring"early-exitadds special handling for{"max-length": 0}
Bugfixes:
no-as-type-assertion- Insert fix at the correct position
- Fixed ordering issues in fixer
- The rule disables itself in
.jsxand.tsxfiles
Features:
no-unusedadds option"unused-catch-binding"to disallow unused catch bindings. Only use this rule if you use TypeScript@2.5.1 or newer
Features:
- new rule
const-parameters
Bugfixes:
prefer-const-enumbail on string to number conversionno-unusedfixed false positive with index signature
Features:
parameter-propertiesadds"trailing"option
Bugfixes:
no-var-before-returnnow detects if variable is used by a closure.prefer-const-enumis now stable:- Correct handling of scopes
- Handle enums merging with namespace
- Exclude enums in global scope
- Handle string valued enums
- Bugfix for enum used as type
- Stricter checks for initializer
Features:
- ✨ New rule
no-unusedto find dead code and unused declarations. - New rule
early-exitrecommends to use an early exit instead of a longifblock. Big thanks to @andy-hanson for this great contribution.
Features:
- New rule
ext-curlyto enforce consistent use of curly braces.
Bugfixes:
no-var-before-returnnow has an exception array destructuring because there could be an iterator being destructured.
Features:
- This package now contains an empty config that can easily be extended using
"extends": ["tslint-consistent-codestyle"]in yourtslint.json - Add documentation about the module resolution of
rulesDirectory
Bugfixes:
- Remove
no-curlyrule from package, which is still under development
Features:
naming-convention: Allow an array of formats
Bugfixes:
naming-convention:globalmodifier now works correctly on functions, classes, enums, etc. Before they were all consideredlocal- type
functionnow correctly inherits from typevariableinstead of getting overridden depending on their ordering - Adding a
filterto a configuration no longer overrides every other config in the inheritance chain
Features:
naming-convention: Addfilteroption to config
Breaking Changes:
- Update to tslint@5
- Removed
prefer-static-method, use tslint'sprefer-function-over-methodinstead - PascalCase and camelCase can no longer contain two adjacent uppercase characters
- UPPER_CASE and snake_case can no longer contain two adjacent underscores
Bugfixes:
- Exempt
thisparameter from name checks