Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### 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.
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,15 @@
"estree-walker": "^3.0.3",
"husky": "^9.1.7",
"oxc-parser": "^0.114.0",
"oxlint": "^1.39.0",
"@oxlint/plugins": "^1.48.0",
"oxlint": "^1.48.0",
"prettier": "3.8.1",
"tsx": "^4.21.0",
"typescript": "^5.9.3",
"vitest": "^4.0.17"
},
"peerDependencies": {
"oxlint": ">=1.0.0"
"@oxlint/plugins": ">=1.43.0"
},
"engines": {
"node": ">=20.0.0"
Expand Down
203 changes: 165 additions & 38 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/extraction/variable-tracker.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Context, ESTreeNode } from '../types.js';
import type { VariableInfo, VariableReference, ReferenceType } from './types.js';
import type { Scope, Variable, Reference } from 'oxlint/plugins';
import type { Scope, Variable, Reference } from '@oxlint/plugins';

interface IdentifierNode {
type: string;
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { definePlugin } from 'oxlint/plugins';
import { definePlugin } from '@oxlint/plugins';
import { maxCyclomatic } from './rules/max-cyclomatic.js';
import { maxCognitive } from './rules/max-cognitive.js';
import { complexity } from './rules/complexity.js';
Expand Down
2 changes: 1 addition & 1 deletion src/rules/complexity.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineRule } from 'oxlint/plugins';
import { defineRule } from '@oxlint/plugins';
import type {
Rule,
Context,
Expand Down
2 changes: 1 addition & 1 deletion src/rules/max-cognitive.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineRule } from 'oxlint/plugins';
import { defineRule } from '@oxlint/plugins';
import type {
Rule,
Context,
Expand Down
2 changes: 1 addition & 1 deletion src/rules/shared.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineRule } from 'oxlint/plugins';
import { defineRule } from '@oxlint/plugins';
import type {
Rule,
Context,
Expand Down
4 changes: 2 additions & 2 deletions src/types.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { ESTree } from 'oxlint/plugins';
import type { ESTree } from '@oxlint/plugins';

export type { Rule, Context, Visitor, VisitorWithHooks, Plugin } from 'oxlint/plugins';
export type { Rule, Context, Visitor, VisitorWithHooks, Plugin } from '@oxlint/plugins';

export type ESTreeNode = ESTree.Node;
export type FunctionNode =
Expand Down