Skip to content

Releases: itaymendel/oxlint-plugin-complexity

v2.0.2

07 Mar 23:16

Choose a tag to compare

Changed

  • Bump oxc-parser from 0.115.0 to 0.116.0
  • Bump @oxlint/plugins from 1.50.0 to 1.51.0
  • Bump oxlint from 1.50.0 to 1.51.0
  • Bump @types/node from 22.19.11 to 22.19.13
  • Bump actions/upload-artifact from 6 to 7

v2.0.1

25 Feb 21:28

Choose a tag to compare

Changed

  • Bump oxc-parser from 0.114.0 to 0.115.0
  • Bump @oxlint/plugins from 1.48.0 to 1.50.0
  • Bump oxlint from 1.48.0 to 1.50.0

v2.0.0

17 Feb 22:14

Choose a tag to compare

Breaking Changes

  • enableExtraction now defaults to true — extraction suggestions are on by default (set enableExtraction: false to opt out)
  • Dropped deprecated rules complexity/max-cyclomatic and complexity/max-cognitive — use complexity/complexity instead

Changed

  • Migrate plugin imports from oxlint/plugins to standalone @oxlint/plugins package (fixes compatibility with oxlint >= 1.45.0)

Added

  • Performance optimization: minLines option to skip complexity analysis for small functions (default: 10 lines)
  • Export createCombinedComplexityVisitor and CombinedComplexityResult from public API

v1.0.0

09 Feb 12:23

Choose a tag to compare

Added

  • Performance optimization: minLines option to skip complexity analysis for small functions. Default: 10 lines.
  • New complexity/complexity rule - Optimized rule that checks both cyclomatic and cognitive complexity in a single AST walk (17% faster than separate rules)
  • Export extraction analysis types and functions from public API
  • Test fixtures for Svelte (.svelte) and Astro (.astro) files
  • Documented framework support: React, Vue, Angular, Svelte, Astro, Solid, Qwik

Changed

  • Clean up unused parameters left over from v0.3.2 refactoring across internal APIs

Deprecated

  • complexity/max-cyclomatic - Use complexity/complexity instead
  • complexity/max-cognitive - Use complexity/complexity instead

Fixed

  • Detect this references in extraction candidates and flag as medium-confidence issue.
  • Detect mutating method calls (push, sort, set, delete, etc.) as variable mutations in extraction analysis.
  • Strengthen extraction tests: replace weak/guarded assertions with exact values and rewrite inline fixtures that produced zero candidates.
  • Fix hasEarlyReturn to use AST-based detection.
  • Fix suggestFunctionName producing incorrect names; replaced with "extracted" placeholder.
  • Fix exported MaxCognitiveOptions type missing extraction and tip-threshold options added in v0.3.0.

v0.3.2

01 Feb 11:52

Choose a tag to compare

Changed

  • Refactored variable tracking to use oxlint's built-in scope APIs
  • Removed reference-utils.ts in favor of oxlint's Reference.isRead()/isWrite() methods
  • Removed visitor merging logic in cognitive/visitor.ts

v0.3.1

27 Jan 15:34

Choose a tag to compare

Changed

  • Bump oxc-parser from 0.108.0 to 0.111.0
  • Bump oxlint from 1.39.0 to 1.42.0
  • Bump prettier from 3.7.4 to 3.8.1
  • Bump vitest from 4.0.17 to 4.0.18

v0.3.0

27 Jan 15:33

Choose a tag to compare

Added

  • Refactoring tips for common complexity patterns (deep nesting, else-if chains, logical operators)
  • Configurable tip thresholds (nestingTipThreshold, elseIfChainThreshold, logicalOperatorThreshold)
  • Smart extraction suggestions with variable flow analysis (opt-in via enableExtraction: true)

Changed

  • Bump oxc-parser from 0.107.0 to 0.108.0
  • Bump oxlint from 1.38.0 to 1.39.0
  • Bump vitest from 4.0.16 to 4.0.17

v0.2.0

13 Jan 09:42

Choose a tag to compare

Added

  • Complexity breakdown in error messages inspired by jfmengels, with top offender marker

v0.1.4

13 Jan 09:42

Choose a tag to compare

Changed

  • Bump oxlint from 1.35.0 to 1.38.0
  • Bump oxc-parser from 0.105.0 to 0.107.0

v0.1.3

13 Jan 09:42

Choose a tag to compare

Changed

  • Updated dependencies
  • Setup Dependabot for automated dependency updates