Skip to content

Commit b8dc697

Browse files
cvclaude
andcommitted
chore: add cyclomatic complexity rule (ratchet from 95)
Add ESLint complexity rule to bin/ and scripts/ to prevent new functions from accumulating excessive branching. Starting threshold is 95 (current worst offender: setupNim in onboard.js). Ratchet plan: 95 → 40 → 25 → 15. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
1 parent cec1e42 commit b8dc697

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎eslint.config.mjs‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ export default [
3939
rules: {
4040
...js.configs.recommended.rules,
4141
"no-unused-vars": ["error", { argsIgnorePattern: "^_", varsIgnorePattern: "^_", caughtErrorsIgnorePattern: "^_" }],
42+
// Cyclomatic complexity — ratchet down as we refactor:
43+
// 95 (current) → 40 → 25 → 15
44+
"complexity": ["error", { max: 95 }],
4245
},
4346
},
4447

0 commit comments

Comments
 (0)