Releases: fimbullinter/wotan
v0.24.0
🎉 This release contains two major features: caching and code fixes in the LanguageService plugin.
The changes in the LanguageService plugin require that you update the @fimbul/mithotyn
dependency and the fimbullinter.vscode-plugin
VSCode plugin if you were using one of them.
Features:
- new rule:
no-object-spread-of-iterable
warns about spreading an array into an object - new rule:
no-implicit-tostring
warns about implicit string coercion of certain types - new CLI option:
--cache
enables caching for fast incremental linting. Read more about caching - the LanguageService plugin uses caching to speed up linting in your editor
- the LanguageService plugin now provides fixes for fixable findings
v0.23.0
prefer-dot-notation
now requires type information
Features:
prefer-dot-notation
no longer reports findings which would cause a compile error when fixed- new rule:
no-writeonly-property-read
- Added support for new language features in all rules:
- optional chaining
- nullish coalescing
- private identifiers
- control-flow effects of
never
-returning functionsno-fallthrough
andno-unreachable-code
report better findings if type inforamtion is availablereturn-never-call
only reports calls that TypeScript's control-flow-analysis cannot detect
- template literal types
no-restricted-property-access
- allow accessing all members via static
super
- allow accessing accessors via
super
- allow accessing abstract accessors via
this
in constructor - disallow read access to uninitialized properties in another property's initializer
- allow accessing all members via static
Bugfixes:
- Exclude JSON files and declartions emitted from
.js(x)
files in composite projects async-function-assignability
fixed false-positive on static class membersno-restricted-property-access
- treat MethodSignature like MethodDeclaration
- fixed lookup of
this
container for decorators and computed property names - fixed crash on parameter properties and special JS property assignments
- most rules can now handle excessively deep AST structures, e.g. concatenating 5000 strings
v0.22.0
- TypeScript <3.9 is no longer supported
- Node.js v8, v11 and v13 are no longer supported
Features:
- Added support for typescript v3.9, v4.0 and v4.1
- Fixes compile errors and crashes in existing code and tests
- This does not contain full support for all language features added in those versions
//@ts-nocheck
in .ts files now disables rules with type information for that file, as it was already the case in .js files
v0.21.1
v0.21.0
- TypeScript v3.1 and v3.2 is no longer officially supported
- Node.js v6 is no longer supported
Rule.supports
can now return a string respresenting the reason for not supporting the fileLinter#lintAndFix
now requires aProgramFactory
instead ofProgram
Linter#lintAndFix
UpdateFileCallback
is now expected to only return aSourceFile
no-inferred-empty-object
was renamed tono-uninferred-type-parameter
Features:
- rules now debuglog the reason for not supporting a certain file
- performance improvements
- when linting with
--project --references
- parsed
tsconfig.json
files are cached for all project references
- parsed
- when linting with
--project --fix
- the project's dependency graph is recalculated lazily the next time a typed rule reuqests type information after fixing a file
- module resolutions are cached between fixes
- when linting with
no-uninferred-type-parameter
properly handles new default constraintunknown
no-uninferred-type-parameter
now detects uninferred type parameters in JS code falling back toany
no-uninferred-type-parameter
correctly handles higher order function typesno-useless-initializer
checks array destructuring- better handling of computed property names
- better handling of object and array destructuring assignments
Bugfixes:
- comments are now included in the transpiled code and declaration files, this makes JSDoc and deprecations visible to API consumers
v0.20.0
🎉 Since the last release we published an official extension for VSCode.
- TypeScript v3.0 is no longer officially supported
Features:
bifrost
: pass names of all linted files to TSLint formatters- new rule:
no-useless-destructuring
no-useless-assertion
: detect redundantas const
assertionsno-useless-assertion
: stricter checks of literal type assertions in const context ({ prop: 1 as 1 } as const
)no-inferred-empty-object
: correctly handle higher order function type inference (type parameter propagation) and unions of call signatures
Bugfixes:
wotan
: fixed a crash caused by changes to TypeScript's internal APIno-useless-predicate
: fixes false positive withtypeof {} === 'object'
no-useless-assertion
: don't treatas const
likeas any
v0.19.0
Features:
- new rule:
no-useless-try-catch
no-useless-predicate
: detect comparing a literal type with itselfno-useless-predicate
: detect redundant uses ofkey in obj
wherekey
is known to always be present inobj
Bugfixes:
no-useless-predicate
: treat property access on index signatures as potentiallyundefined
no-useless-predicate
: don't report expressions as "always truthy" withoutstrictNullChecks
no-useless-predicate
: avoid nested finding by reporting only the innermost finding
v0.18.0
- configuration: patterns (
exclude
andoverrides[].files
) match dotfiles, e.g.*.spec.ts
now matches.foo.spec.ts
. - disable comments: handling of nested ranges changed.
//wotan-enable-line
in a line disabled by//wotan-disable-next-line
is ignored - API: completely refactored
FileFilterFactory
,FileFilter
,LineSwitchFilterFactory
,LineSwitchParser
andDefaultLineSwitchParser
Features:
- unchecked JS files (
//@ts-nocheck
orcheckJs: false
) are never linted with type information - added
report-useless-directives
CLI option to report unused and redundant enable and disable comments
Bugfixes:
wotan
: added missing exports to the public API- patterns in configuration files match dotfiles (see breaking changes)
v0.17.0
🎉 This release introduces a plugin for TypeScript's LanguageService. This enables in-editor linting while you type. See the docs for more details.
- TypeScript 2.8 and 2.9 is no longer supported
- API:
Failure
was renamed toFinding
throughout the codebaseResolver
adds a new required methodgetDefaultExtensions
Resolver#resolve
makes parametersbasedir
andextensions
optionalRunner
requires a new serviceFileFilterFactory
- added severity
suggestion
Features:
- new package
@fimbul/mithotyn
provides in-editor linting through a TypeScript LanguageService Plugin - new severity:
suggestion
--fix
can no longer introduce syntax errorsasync-function-assignability
: checks methods and properties with computed namesasync-function-assignability
: checks method overloads individually- new service abstraction
FileFilterFactory
andFileFilter
allow customizing which files are linted @fimbul/ve
no longer includes the line break after the opening tag in the linted code@fimbul/ve
correctly adjusts the column of findings in the first line if there is no line break after the opening tagprefer-number-methods
: fixed finding location
Bugfixes:
- declaration files no longer contain
const enum
- core services no longer rely on the existence of
require
- YAML configuration can now contain YAML-specific types
v0.16.0
Features:
- new rule:
async-function-assignability
- handle
BigInt
types and literals no-duplicate-case
: correctly handles BigInt and (bitwise) negation thereofno-invalid-assertion
: adds an additional check for asserting BigIntsno-useless-predicage
: allows comparingtypeof v === "bigint"
no-duplicate-spread-property
: handle spreading of type variables introduced in [email protected]
Bugfixes:
no-duplicate-case
: only use type information ifstrictNullChecks
is enabled to avoid false positives- CLI normalizes
..
and.
in glob patterns and file names no-duplicate-spread-property
: works with intersection types