All files / src/signals constants.ts

89.47% Statements 17/19
100% Branches 0/0
0% Functions 0/2
89.47% Lines 17/19

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33          5x 5x   5x   5x 5x 5x 5x 5x 5x 5x 5x 5x   5x   5x     5x       5x   5x  
/**
 * Constants for AI Signal Clarity detection.
 * Extracted to improve AI signal clarity and maintainability.
 */
 
export const LINE_THRESHOLD_CRITICAL = 750;
export const LINE_THRESHOLD_MAJOR = 500;
 
export const CALLBACK_DEPTH_THRESHOLD = 3;
 
export const CATEGORY_LARGE_FILE = 'large-file';
export const CATEGORY_UNDOCUMENTED_EXPORT = 'undocumented-export';
export const CATEGORY_IMPLICIT_SIDE_EFFECT = 'implicit-side-effect';
export const CATEGORY_AMBIGUOUS_NAME = 'ambiguous-name';
export const CATEGORY_OVERLOADED_SYMBOL = 'overloaded-symbol';
export const CATEGORY_MAGIC_LITERAL = 'magic-literal';
export const CATEGORY_REDUNDANT_TYPE_CONSTANT = 'redundant-type-constant';
export const CATEGORY_BOOLEAN_TRAP = 'boolean-trap';
export const CATEGORY_DEEP_CALLBACK = 'deep-callback';
 
export const IGNORE_EXPORTS = ['default', 'anonymous'];
 
export const MSG_EXTREME_FILE = (lineCount: number) =>
  `Extreme file length (${lineCount} lines) — AI context window will overflow or "Lose the Middle" critical details.`;
 
export const MSG_LARGE_FILE = (lineCount: number) =>
  `Large file (${lineCount} lines) — pushing the limits of effective AI reasoning.`;
 
export const SUGGESTION_SPLIT_FILE =
  'Split into smaller, single-responsibility modules (< 500 lines).';
export const SUGGESTION_REFACTOR_FILE =
  'Consider refactoring and extracting logic to new files.';