Releases: itaymendel/oxlint-plugin-complexity
Releases · itaymendel/oxlint-plugin-complexity
v2.0.2
v2.0.1
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
Breaking Changes
enableExtractionnow defaults totrue— extraction suggestions are on by default (setenableExtraction: falseto opt out)- Dropped deprecated rules
complexity/max-cyclomaticandcomplexity/max-cognitive— usecomplexity/complexityinstead
Changed
- Migrate plugin imports from
oxlint/pluginsto standalone@oxlint/pluginspackage (fixes compatibility with oxlint >= 1.45.0)
Added
- Performance optimization:
minLinesoption to skip complexity analysis for small functions (default: 10 lines) - Export
createCombinedComplexityVisitorandCombinedComplexityResultfrom public API
v1.0.0
Added
- Performance optimization:
minLinesoption to skip complexity analysis for small functions. Default: 10 lines. - New
complexity/complexityrule - 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- Usecomplexity/complexityinsteadcomplexity/max-cognitive- Usecomplexity/complexityinstead
Fixed
- Detect
thisreferences 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
hasEarlyReturnto use AST-based detection. - Fix
suggestFunctionNameproducing incorrect names; replaced with"extracted"placeholder. - Fix exported
MaxCognitiveOptionstype missing extraction and tip-threshold options added in v0.3.0.
v0.3.2
Changed
- Refactored variable tracking to use oxlint's built-in scope APIs
- Removed
reference-utils.tsin favor of oxlint'sReference.isRead()/isWrite()methods - Removed visitor merging logic in
cognitive/visitor.ts
v0.3.1
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
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
Added
- Complexity breakdown in error messages inspired by jfmengels, with top offender marker
v0.1.4
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
Changed
- Updated dependencies
- Setup Dependabot for automated dependency updates