Skip to content

Releases: fimbullinter/wotan

v0.24.0

19 Feb 18:33
Compare
Choose a tag to compare

🎉 This release contains two major features: caching and code fixes in the LanguageService plugin.

⚠️ Breaking Changes:

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

17 Jan 13:09
Compare
Choose a tag to compare

⚠️ Breaking Changes:

  • 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 functions
      • no-fallthrough and no-unreachable-code report better findings if type inforamtion is available
      • return-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

Bugfixes:

  • Exclude JSON files and declartions emitted from .js(x) files in composite projects
  • async-function-assignability fixed false-positive on static class members
  • no-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

09 Dec 13:55
Compare
Choose a tag to compare

⚠️ Breaking Changes:

  • 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

21 Jun 18:08
Compare
Choose a tag to compare

Bugfixes:

  • wotan: properly handle backslashes in Windows paths to not report "is not included in any of the projects"

v0.21.0

06 Jun 19:56
Compare
Choose a tag to compare

⚠️ Breaking Changes:

  • 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 file
  • Linter#lintAndFix now requires a ProgramFactory instead of Program
  • Linter#lintAndFix UpdateFileCallback is now expected to only return a SourceFile
  • no-inferred-empty-object was renamed to no-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
    • 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
  • no-uninferred-type-parameter properly handles new default constraint unknown
  • no-uninferred-type-parameter now detects uninferred type parameters in JS code falling back to any
  • no-uninferred-type-parameter correctly handles higher order function types
  • no-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

16 Mar 17:06
Compare
Choose a tag to compare

🎉 Since the last release we published an official extension for VSCode.

⚠️ Breaking Changes:

  • 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 redundant as const assertions
  • no-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 API
  • no-useless-predicate: fixes false positive with typeof {} === 'object'
  • no-useless-assertion: don't treat as const like as any

v0.19.0

22 Jan 11:17
Compare
Choose a tag to compare

Features:

  • new rule: no-useless-try-catch
  • no-useless-predicate: detect comparing a literal type with itself
  • no-useless-predicate: detect redundant uses of key in obj where key is known to always be present in obj

Bugfixes:

  • no-useless-predicate: treat property access on index signatures as potentially undefined
  • no-useless-predicate: don't report expressions as "always truthy" without strictNullChecks
  • no-useless-predicate: avoid nested finding by reporting only the innermost finding

v0.18.0

06 Jan 15:21
Compare
Choose a tag to compare

⚠️ Breaking Changes:

  • configuration: patterns (exclude and overrides[].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 and DefaultLineSwitchParser

Features:

  • unchecked JS files (//@ts-nocheck or checkJs: 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

21 Dec 20:15
Compare
Choose a tag to compare

🎉 This release introduces a plugin for TypeScript's LanguageService. This enables in-editor linting while you type. See the docs for more details.

⚠️ Breaking Changes:

  • TypeScript 2.8 and 2.9 is no longer supported
  • API:
    • Failure was renamed to Finding throughout the codebase
    • Resolver adds a new required method getDefaultExtensions
    • Resolver#resolve makes parameters basedir and extensions optional
    • Runner requires a new service FileFilterFactory
    • 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 errors
  • async-function-assignability: checks methods and properties with computed names
  • async-function-assignability: checks method overloads individually
  • new service abstraction FileFilterFactory and FileFilter 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 tag
  • prefer-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

23 Nov 22:32
Compare
Choose a tag to compare

Features:

  • new rule: async-function-assignability
  • handle BigInt types and literals
  • no-duplicate-case: correctly handles BigInt and (bitwise) negation thereof
  • no-invalid-assertion: adds an additional check for asserting BigInts
  • no-useless-predicage: allows comparing typeof v === "bigint"
  • no-duplicate-spread-property: handle spreading of type variables introduced in typescript@3.2

Bugfixes:

  • no-duplicate-case: only use type information if strictNullChecks is enabled to avoid false positives
  • CLI normalizes .. and . in glob patterns and file names
  • no-duplicate-spread-property: works with intersection types