
Company News
Socket Joins New OpenJS Program to Fund Node.js Security Work
Socket is joining the OpenJS Security Stewardship Program to fund Node.js vulnerability research, maintainer remediation, and security releases.
eslint-plugin-complexijs
Advanced tools
ESLint plugin reporting cognitive complexity computed by the complexijs Rust engine
ESLint plugin that enforces a per-function cognitive complexity threshold using the complexijs Rust/WASM engine.
The analysis runs on raw source text, so it does not depend on ESLint's AST. TypeScript files work: the WASM engine can parse them directly, though you still need the usual typescript-eslint parser configured for ESLint itself if you want type-aware rules.
npm install --save-dev eslint eslint-plugin-complexijs
// eslint.config.js
const complexijs = require("eslint-plugin-complexijs");
module.exports = [
{
plugins: { complexijs },
rules: {
"complexijs/complexity": ["error", { max: 15 }],
},
},
];
The recommended config wires up the rule at warn with max: 15:
// eslint.config.js
const complexijs = require("eslint-plugin-complexijs");
module.exports = [
complexijs.configs.recommended,
];
| Option | Type | Default | Description |
|---|---|---|---|
max | integer >= 0 | 15 | Maximum allowed cognitive complexity per function. Functions strictly above this value are reported. |
Place a // complexijs: ignore comment on the function definition line or on the line directly above it:
// complexijs: ignore
function legacyRouter(req, res) {
// ...
}
The marker is processed by the WASM engine, not by the ESLint rule, so it works regardless of the max setting.
See the complexijs CLI README for the full scoring model. In brief: branching constructs (if, loops, switch, ternary, catch) each add 1 plus a nesting penalty. Boolean sequences add 1 per operator-type transition. Direct recursion adds 1.
complexijs/complexity reports one violation per function that exceeds the threshold. The message includes the function name, its score, and the current max.
FAQs
ESLint plugin reporting cognitive complexity computed by the complexijs Rust engine
We found that eslint-plugin-complexijs demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Company News
Socket is joining the OpenJS Security Stewardship Program to fund Node.js vulnerability research, maintainer remediation, and security releases.

Security News
Two compromised GitHub Actions were re-enabled with malicious tags intact, exposing thousands of downstream repositories to Mini Shai-Hulud.

Research
/Security News
A malicious Firefox extension fetches its payload after installation to evade detection, steal Google session cookies, and automate account takeover.