debtlens 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,18 @@
3
3
  All notable changes to DebtLens are documented here. This project adheres to
4
4
  [Semantic Versioning](https://semver.org/).
5
5
 
6
+ ## [0.1.1] - 2026-06-01
7
+
8
+ ### Added
9
+ - **`--quiet` / `-q`** on `debtlens scan`: terminal output shows header and summary
10
+ counts only; individual findings are suppressed. Exit codes and `--fail-on` are unchanged.
11
+ - **Configurable prop-drilling ignores** via `propDrilling.ignoreComponents` in
12
+ `debtlens.config.json` (extends the built-in host-component list).
13
+
14
+ ### Changed
15
+ - Contributor docs: [`docs/good-first-issues.md`](./docs/good-first-issues.md) links to
16
+ GitHub issues #1–#28.
17
+
6
18
  ## [0.1.0] - 2026-06-01
7
19
 
8
20
  First public release.
package/README.md CHANGED
@@ -103,6 +103,7 @@ Options:
103
103
  --config <path> path to debtlens.config.json
104
104
  --cwd <path> working directory
105
105
  --no-color disable terminal color
106
+ -q, --quiet terminal only: summary counts, no per-finding detail
106
107
  ```
107
108
 
108
109
  Examples:
@@ -157,6 +158,9 @@ Create `debtlens.config.json`:
157
158
  "state-sprawl.maxStatefulHooks": 6,
158
159
  "effect-complexity.maxLines": 30,
159
160
  "duplicate-logic.minSimilarity": 0.86
161
+ },
162
+ "propDrilling": {
163
+ "ignoreComponents": ["DesignSystemCard", "DesignSystemModal"]
160
164
  }
161
165
  }
162
166
  ```
package/dist/cli/index.js CHANGED
@@ -16,7 +16,7 @@ const program = new Command();
16
16
  program
17
17
  .name("debtlens")
18
18
  .description("Find maintainability debt common in fast-moving AI-assisted TypeScript and React codebases.")
19
- .version("0.1.0");
19
+ .version("0.1.1");
20
20
  program.command("scan")
21
21
  .description("Scan a project, directory, or file for maintainability debt.")
22
22
  .argument("[target]", "directory or file to scan", ".")
@@ -35,6 +35,7 @@ program.command("scan")
35
35
  .option("--config <path>", "path to debtlens.config.json")
36
36
  .option("--cwd <path>", "working directory", process.cwd())
37
37
  .option("--no-color", "disable ANSI color in terminal output")
38
+ .option("-q, --quiet", "print only the summary line, suppress individual findings")
38
39
  .action(async (target, rawOptions) => {
39
40
  try {
40
41
  const format = parseFormat(String(rawOptions.format ?? "terminal"));
@@ -78,7 +79,7 @@ program.command("scan")
78
79
  const reported = rawOptions.baseline
79
80
  ? applyBaseline(result, loadBaseline(cwd, String(rawOptions.baseline)))
80
81
  : result;
81
- const report = renderReport(reported, format, { color: rawOptions.color !== false && format === "terminal" && process.stdout.isTTY });
82
+ const report = renderReport(reported, format, { color: rawOptions.color !== false && format === "terminal" && process.stdout.isTTY, quiet: rawOptions.quiet === true });
82
83
  if (rawOptions.output) {
83
84
  const outputPath = resolve(cwd, String(rawOptions.output));
84
85
  mkdirSync(dirname(outputPath), { recursive: true });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,yBAAyB,EAAE,aAAa,EAAE,cAAc,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAC5H,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAElE,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,YA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AK,iDAAiD,CAAC,CAAC;AAC7F,CAAC"}
@@ -36,5 +36,8 @@ export const defaultConfig = {
36
36
  },
37
37
  maxFiles: 2000,
38
38
  vocabulary: {},
39
+ propDrilling: {
40
+ ignoreComponents: [],
41
+ },
39
42
  };
40
43
  //# sourceMappingURL=defaults.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"defaults.js","sourceRoot":"","sources":["../../src/config/defaults.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,aAAa,GAA6B;IACrD,OAAO,EAAE,CAAC,sBAAsB,CAAC;IACjC,OAAO,EAAE;QACP,iBAAiB;QACjB,SAAS;QACT,UAAU;QACV,aAAa;QACb,UAAU;QACV,UAAU;QACV,WAAW;QACX,QAAQ;QACR,YAAY;QACZ,WAAW;QACX,aAAa;QACb,2BAA2B;QAC3B,2BAA2B;QAC3B,iBAAiB;QACjB,iBAAiB;KAClB;IACD,WAAW,EAAE,KAAK;IAClB,KAAK,EAAE,EAAE;IACT,UAAU,EAAE;QACV,0BAA0B,EAAE,GAAG;QAC/B,6BAA6B,EAAE,EAAE;QACjC,0BAA0B,EAAE,EAAE;QAC9B,+BAA+B,EAAE,CAAC;QAClC,4BAA4B,EAAE,EAAE;QAChC,mCAAmC,EAAE,CAAC;QACtC,+BAA+B,EAAE,IAAI;QACrC,0BAA0B,EAAE,CAAC;QAC7B,6BAA6B,EAAE,GAAG;QAClC,kCAAkC,EAAE,CAAC;QACrC,iCAAiC,EAAE,CAAC;QACpC,0BAA0B,EAAE,CAAC;QAC7B,yCAAyC,EAAE,GAAG;KAC/C;IACD,QAAQ,EAAE,IAAI;IACd,UAAU,EAAE,EAAE;CACf,CAAC"}
1
+ {"version":3,"file":"defaults.js","sourceRoot":"","sources":["../../src/config/defaults.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,aAAa,GAA6B;IACrD,OAAO,EAAE,CAAC,sBAAsB,CAAC;IACjC,OAAO,EAAE;QACP,iBAAiB;QACjB,SAAS;QACT,UAAU;QACV,aAAa;QACb,UAAU;QACV,UAAU;QACV,WAAW;QACX,QAAQ;QACR,YAAY;QACZ,WAAW;QACX,aAAa;QACb,2BAA2B;QAC3B,2BAA2B;QAC3B,iBAAiB;QACjB,iBAAiB;KAClB;IACD,WAAW,EAAE,KAAK;IAClB,KAAK,EAAE,EAAE;IACT,UAAU,EAAE;QACV,0BAA0B,EAAE,GAAG;QAC/B,6BAA6B,EAAE,EAAE;QACjC,0BAA0B,EAAE,EAAE;QAC9B,+BAA+B,EAAE,CAAC;QAClC,4BAA4B,EAAE,EAAE;QAChC,mCAAmC,EAAE,CAAC;QACtC,+BAA+B,EAAE,IAAI;QACrC,0BAA0B,EAAE,CAAC;QAC7B,6BAA6B,EAAE,GAAG;QAClC,kCAAkC,EAAE,CAAC;QACrC,iCAAiC,EAAE,CAAC;QACpC,0BAA0B,EAAE,CAAC;QAC7B,yCAAyC,EAAE,GAAG;KAC/C;IACD,QAAQ,EAAE,IAAI;IACd,UAAU,EAAE,EAAE;IACd,YAAY,EAAE;QACZ,gBAAgB,EAAE,EAAE;KACrB;CACF,CAAC"}
@@ -20,6 +20,10 @@ export function mergeConfig(target, fileConfig, cliOptions) {
20
20
  },
21
21
  maxFiles: cliOptions.maxFiles ?? fileConfig.maxFiles ?? defaultConfig.maxFiles,
22
22
  vocabulary: { ...defaultConfig.vocabulary, ...(fileConfig.vocabulary ?? {}) },
23
+ propDrillingIgnoreComponents: [
24
+ ...(defaultConfig.propDrilling?.ignoreComponents ?? []),
25
+ ...(fileConfig.propDrilling?.ignoreComponents ?? []),
26
+ ],
23
27
  changedFiles: cliOptions.changedFiles,
24
28
  };
25
29
  }
@@ -1 +1 @@
1
- {"version":3,"file":"mergeConfig.js","sourceRoot":"","sources":["../../src/config/mergeConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAG9C,MAAM,UAA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AC5B,GAAG,CAAC,aAAa,CAAC,YAAY,EAAE,gBAAgB,IAAI,EAAE,CAAC;YACvD,GAAG,CAAC,UAAU,CAAC,YAAY,EAAE,gBAAgB,IAAI,EAAE,CAAC;SACrD;QACD,YAAY,EAAE,UAAU,CAAC,YAAY;KACtC,CAAC;AACJ,CAAC"}
@@ -57,6 +57,18 @@ export function buildConfigSchema() {
57
57
  items: { type: "string" },
58
58
  },
59
59
  },
60
+ propDrilling: {
61
+ type: "object",
62
+ description: "Prop-drilling rule configuration.",
63
+ properties: {
64
+ ignoreComponents: {
65
+ type: "array",
66
+ items: { type: "string" },
67
+ description: "Additional UI primitive component names to ignore (extends built-in host components).",
68
+ },
69
+ },
70
+ additionalProperties: false,
71
+ },
60
72
  },
61
73
  };
62
74
  }
@@ -1 +1 @@
1
- {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/config/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAE9C,MAAM,CAAC,MAAM,SAAS,GACpB,iGAAiG,CAAC;AAEpG;;;;GAIG;AACH,MAAM,UAAU,iBAAiB;IAC/B,MAAM,eAAe,GAAG,MAAM,CAAC,WAAW,CACxC,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC,CAC9E,CAAC;IAEF,OAAO;QACL,OAAO,EAAE,yCAAyC;QAClD,GAAG,EAAE,SAAS;QACd,KAAK,EAAE,wBAAwB;QAC/B,WAAW,EAAE,qDAAqD;QAClE,IAAI,EAAE,QAAQ;QACd,oBAAoB,EAAE,KAAK;QAC3B,UAAU,EAAE;YACV,OAAO,EAAE,E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Ae;gBAC3B,oBAAoB,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;aACzC;YACD,UAAU,EAAE;gBACV,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,8DAA8D;gBAC3E,oBAAoB,EAAE;oBACpB,IAAI,EAAE,OAAO;oBACb,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;iBAC1B;aACF;YACD,YAAY,EAAE;gBACZ,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,mCAAmC;gBAChD,UAAU,EAAE;oBACV,gBAAgB,EAAE;wBAChB,IAAI,EAAE,OAAO;wBACb,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;wBACzB,WAAW,EAAE,uFAAuF;qBACrG;iBACF;gBACD,oBAAoB,EAAE,KAAK;aAC5B;SACF;KACF,CAAC;AACJ,CAAC"}
@@ -38,6 +38,10 @@ export interface DebtLensConfig {
38
38
  maxFiles?: number;
39
39
  /** Concept id -> competing term variants, used by the naming-drift rule. */
40
40
  vocabulary?: Record<string, string[]>;
41
+ /** Prop-drilling rule configuration. */
42
+ propDrilling?: {
43
+ ignoreComponents?: string[];
44
+ };
41
45
  }
42
46
  export interface ScanOptions {
43
47
  cwd: string;
@@ -51,6 +55,8 @@ export interface ScanOptions {
51
55
  vocabulary?: Record<string, string[]>;
52
56
  /** When set, only scan files whose absolute path is in this list (--changed mode). */
53
57
  changedFiles?: string[];
58
+ /** Prop-drilling rule configuration. */
59
+ propDrillingIgnoreComponents?: string[];
54
60
  }
55
61
  export interface CliOptions {
56
62
  cwd?: string;
@@ -12,6 +12,7 @@ export const propDrillingDetector = {
12
12
  detect(context) {
13
13
  const issues = [];
14
14
  const maxForwardedProps = context.getThreshold("prop-drilling.maxForwardedProps", 4);
15
+ const customIgnoreComponents = context.options.propDrillingIgnoreComponents;
15
16
  for (const file of context.files) {
16
17
  for (const fn of collectFunctionLikes(file)) {
17
18
  if (fn.classification !== "component")
@@ -29,7 +30,7 @@ export const propDrillingDetector = {
29
30
  const tagName = jsx.getTagNameNode().getText();
30
31
  // Skip host elements (lowercase DOM tags) and UI primitives (RN/icon
31
32
  // components are PascalCase but aren't user-defined children).
32
- if (/^[a-z]/.test(tagName) || isHostComponent(tagName))
33
+ if (/^[a-z]/.test(tagName) || isHostComponent(tagName, customIgnoreComponents))
33
34
  continue;
34
35
  const childForwarded = new Set();
35
36
  for (const attribute of jsx.getAttributes()) {
@@ -1 +1 @@
1
- {"version":3,"file":"propDrilling.js","sourceRoot":"","sources":["../../src/detectors/propDrilling.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE5C,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACxE,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,MAAM,CAAC,MAAM,oBAAoB,GAAa;IAC5C,EAAE,EAAE,eAAe;IACnB,IAAI,EAAE,eAAe;IACrB,WAAW,EAAE,iEAAiE;IAC9E,eAAe,EAAE,QAAQ;IACzB,IAAI,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,kBAAkB,CAAC;IAC5C,MAAM,CAAC,OAAwB;QAC7B,MAAM,MAAM,GAAgB,EAAE,CAAC;QAC/B,MAAM,iBAAiB,GAAG,OAAO,CAAC,YAAY,CAAC,iCAAiC,EAAE,CAAC,CAAC,CAAC;QAErF,KAAK,MAAM,IAAI,IAAI,OAAO,CAAC,KAAK,EAAE,CAAC;YACjC,KAAK,MAAM,EAAE,IAAI,oBAAoB,CAAC,IAAI,CAAC,EAAE,CAAC;gBAC5C,IAAI,EAAE,CAAC,cAAc,KAAK,WAAW;oBAAE,SAAS;gBAChD,MAAM,SAAS,GAAG,cAAc,CAAC,EAAE,CAAC,IAAI,CA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+1,5 @@
1
1
  import type { OutputFormat, ScanResult } from "../core/types.js";
2
2
  export declare function renderReport(result: ScanResult, format: OutputFormat, options?: {
3
3
  color?: boolean;
4
+ quiet?: boolean;
4
5
  }): string;
@@ -9,6 +9,6 @@ export function renderReport(result, format, options = {}) {
9
9
  return renderMarkdown(result);
10
10
  if (format === "sarif")
11
11
  return renderSarif(result);
12
- return renderTerminal(result, { color: options.color ?? true });
12
+ return renderTerminal(result, { color: options.color ?? true, quiet: options.quiet });
13
13
  }
14
14
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/reporters/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD,MAAM,UAAU,YAAY,CAAC,MAAkB,EAAE,MAAoB,EAAE,UAA+B,EAAE;IACtG,IAAI,MAAM,KAAK,MAAM;QAAE,OAAO,UAAU,CAAC,MAAM,CAAC,CAAC;IACjD,IAAI,MAAM,KAAK,UAAU;QAAE,OAAO,cAAc,CAAC,MAAM,CAAC,CAAC;IACzD,IAAI,MAAM,KAAK,OAAO;QAAE,OAAO,WAAW,CAAC,MAAM,CAAC,CAAC;IACnD,OAAO,cAAc,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,IAAI,IAAI,EAAE,CAAC,CAAC;AAClE,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/reporters/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD,MAAM,UAAU,YAAY,CAAC,MAAkB,EAAE,MAAoB,EAAE,UAAgD,EAAE;IACvH,IAAI,MAAM,KAAK,MAAM;QAAE,OAAO,UAAU,CAAC,MAAM,CAAC,CAAC;IACjD,IAAI,MAAM,KAAK,UAAU;QAAE,OAAO,cAAc,CAAC,MAAM,CAAC,CAAC;IACzD,IAAI,MAAM,KAAK,OAAO;QAAE,OAAO,WAAW,CAAC,MAAM,CAAC,CAAC;IACnD,OAAO,cAAc,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,IAAI,IAAI,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC;AACxF,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { allDetectors } from "../detectors/index.js";
2
- const TOOL_VERSION = "0.1.0";
2
+ const TOOL_VERSION = "0.1.1";
3
3
  const INFORMATION_URI = "https://github.com/ColumbusLabs/debtlens";
4
4
  function toSarifLevel(severity) {
5
5
  switch (severity) {
@@ -1,4 +1,5 @@
1
1
  import type { ScanResult } from "../core/types.js";
2
2
  export declare function renderTerminal(result: ScanResult, options?: {
3
3
  color: boolean;
4
+ quiet?: boolean;
4
5
  }): string;
@@ -6,6 +6,9 @@ export function renderTerminal(result, options = { color: true }) {
6
6
  lines.push(color.bold("DebtLens Report"));
7
7
  lines.push(`Scanned ${result.summary.filesScanned} files with ${result.summary.rulesRun} rules in ${result.summary.elapsedMs}ms.`);
8
8
  lines.push(`Issues: ${result.summary.totalIssues} | high ${result.summary.bySeverity.high} | medium ${result.summary.bySeverity.medium} | low ${result.summary.bySeverity.low} | info ${result.summary.bySeverity.info}`);
9
+ if (options.quiet) {
10
+ return `${lines.join("\n")}\n`;
11
+ }
9
12
  if (result.issues.length === 0) {
10
13
  lines.push("");
11
14
  lines.push("No maintainability debt found at the configured severity level.");
@@ -1 +1 @@
1
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AC,CAAC;YACrG,KAAK,CAAC,IAAI,CAAC,KAAK,KAAK,CAAC,IAAI,GAAG,QAAQ,EAAE,CAAC,CAAC;YACzC,KAAK,CAAC,IAAI,CAAC,KAAK,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;YACjC,KAAK,CAAC,IAAI,CAAC,gBAAgB,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,UAAU,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC;YAClE,IAAI,KAAK,CAAC,QAAQ,EAAE,MAAM,EAAE,CAAC;gBAC3B,KAAK,MAAM,QAAQ,IAAI,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC;oBAClD,KAAK,CAAC,IAAI,CAAC,OAAO,QAAQ,EAAE,CAAC,CAAC;gBAChC,CAAC;YACH,CAAC;YACD,IAAI,KAAK,CAAC,UAAU,EAAE,CAAC;gBACrB,KAAK,CAAC,IAAI,CAAC,iBAAiB,KAAK,CAAC,UAAU,EAAE,CAAC,CAAC;YAClD,CAAC;YACD,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACjB,CAAC;IACH,CAAC;IAED,OAAO,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;AACjC,CAAC"}
@@ -8,5 +8,8 @@ export declare const HOST_COMPONENTS: Set<string>;
8
8
  /**
9
9
  * Returns true if a JSX tag name refers to a host primitive (so it should be ignored
10
10
  * as a "child component"). Handles namespaced tags like `Animated.View`.
11
+ *
12
+ * @param tagName - The JSX tag name to check
13
+ * @param customIgnoreComponents - Optional array of additional component names to treat as host primitives
11
14
  */
12
- export declare function isHostComponent(tagName: string): boolean;
15
+ export declare function isHostComponent(tagName: string, customIgnoreComponents?: string[]): boolean;
@@ -49,9 +49,15 @@ export const HOST_COMPONENTS = new Set([
49
49
  /**
50
50
  * Returns true if a JSX tag name refers to a host primitive (so it should be ignored
51
51
  * as a "child component"). Handles namespaced tags like `Animated.View`.
52
+ *
53
+ * @param tagName - The JSX tag name to check
54
+ * @param customIgnoreComponents - Optional array of additional component names to treat as host primitives
52
55
  */
53
- export function isHostComponent(tagName) {
56
+ export function isHostComponent(tagName, customIgnoreComponents) {
54
57
  const base = tagName.split(".").pop() ?? tagName;
55
- return HOST_COMPONENTS.has(base) || HOST_COMPONENTS.has(tagName);
58
+ const allComponents = customIgnoreComponents
59
+ ? new Set([...HOST_COMPONENTS, ...customIgnoreComponents])
60
+ : HOST_COMPONENTS;
61
+ return allComponents.has(base) || allComponents.has(tagName);
56
62
  }
57
63
  //# sourceMappingURL=hostComponents.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"hostComponents.js","sourceRoot":"","sources":["../../src/utils/hostComponents.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,GAAG,CAAS;IAC7C,oBAAoB;IACpB,MAAM;IACN,MAAM;IACN,OAAO;IACP,iBAAiB;IACjB,YAAY;IACZ,UAAU;IACV,aAAa;IACb,iBAAiB;IACjB,WAAW;IACX,kBAAkB;IAClB,oBAAoB;IACpB,0BAA0B;IAC1B,yBAAyB;IACzB,WAAW;IACX,QAAQ;IACR,OAAO;IACP,mBAAmB;IACnB,QAAQ;IACR,gBAAgB;IAChB,WAAW;IACX,cAAc;IACd,sBAAsB;IACtB,UAAU;IACV,6BAA6B;IAC7B,gBAAgB;IAChB,UAAU;IACV,eAAe;IACf,wBAAwB;IACxB,UAAU;IACV,SAAS;IACT,aAAa;IACb,cAAc;IACd,WAAW;IACX,QAAQ;IACR,UAAU;IACV,iBAAiB;IACjB,UAAU;IACV,YAAY;IACZ,QAAQ;CACT,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,UAAU,eAAe,CAAC,OAAe;IAC7C,MAAM,IAAI,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,IAAI,OAAO,CAAC;IACjD,OAAO,eAAe,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,eAAe,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;AACnE,CAAC"}
1
+ {"version":3,"file":"hostComponents.js","sourceRoot":"","sources":["../../src/utils/hostComponents.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,GAAG,CAAS;IAC7C,oBAAoB;IACpB,MAAM;IACN,MAAM;IACN,OAAO;IACP,iBAAiB;IACjB,YAAY;IACZ,UAAU;IACV,aAAa;IACb,iBAAiB;IACjB,WAAW;IACX,kBAAkB;IAClB,oBAAoB;IACpB,0BAA0B;IAC1B,yBAAyB;IACzB,WAAW;IACX,QAAQ;IACR,OAAO;IACP,mBAAmB;IACnB,QAAQ;IACR,gBAAgB;IAChB,WAAW;IACX,cAAc;IACd,sBAAsB;IACtB,UAAU;IACV,6BAA6B;IAC7B,gBAAgB;IAChB,UAAU;IACV,eAAe;IACf,wBAAwB;IACxB,UAAU;IACV,SAAS;IACT,aAAa;IACb,cAAc;IACd,WAAW;IACX,QAAQ;IACR,UAAU;IACV,iBAAiB;IACjB,UAAU;IACV,YAAY;IACZ,QAAQ;CACT,CAAC,CAAC;AAEH;;;;;;GAMG;AACH,MAAM,UAAU,eAAe,CAAC,OAAe,EAAE,sBAAiC;IAChF,MAAM,IAAI,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,IAAI,OAAO,CAAC;IACjD,MAAM,aAAa,GAAG,sBAAsB;QAC1C,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,GAAG,eAAe,EAAE,GAAG,sBAAsB,CAAC,CAAC;QAC1D,CAAC,CAAC,eAAe,CAAC;IACpB,OAAO,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,aAAa,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;AAC/D,CAAC"}
@@ -1,63 +1,172 @@
1
1
  # Good first issues
2
2
 
3
- Scoped, self-contained tasks for new contributors. Each lists where to start and how to
4
- verify. Open these as GitHub issues (label `good-first-rule` / `good-first-issue`) once
5
- the repo is public. See [`CONTRIBUTING.md`](../CONTRIBUTING.md) for setup.
3
+ Scoped, self-contained tasks for new contributors. Each entry links to a tracked GitHub
4
+ issue with acceptance criteria. See [`CONTRIBUTING.md`](../CONTRIBUTING.md) for setup.
5
+
6
+ **Labels:** `good first issue` (general) · `good-first-rule` (detector/rule work)
6
7
 
7
8
  ## Rules
8
9
 
9
- ### 1. Make the `prop-drilling` host-component list configurable
10
+ | # | Task | Issue |
11
+ | --- | --- | --- |
12
+ | 1 | Make the `prop-drilling` host-component list configurable | [#1](https://github.com/ColumbusLabs/DebtLens/issues/1) |
13
+ | 2 | Teach `large-component` to recognize `memo`, `forwardRef`, and class components | [#2](https://github.com/ColumbusLabs/DebtLens/issues/2) |
14
+ | 3 | Reduce `naming-drift` false positives on domain-rich apps | [#3](https://github.com/ColumbusLabs/DebtLens/issues/3) |
15
+ | 4 | Configurable markers for `todo-comment` | [#4](https://github.com/ColumbusLabs/DebtLens/issues/4) |
16
+ | 15 | Extend `effect-complexity` to `useLayoutEffect` / `useInsertionEffect` | [#15](https://github.com/ColumbusLabs/DebtLens/issues/15) |
17
+ | 27 | Warn when `duplicate-logic` hits `maxSnippets` cap | [#27](https://github.com/ColumbusLabs/DebtLens/issues/27) |
18
+
19
+ ### 1. Make the `prop-drilling` host-component list configurable — [#1](https://github.com/ColumbusLabs/DebtLens/issues/1)
20
+
10
21
  The ignore list of UI primitives lives in [`src/utils/hostComponents.ts`](../src/utils/hostComponents.ts).
11
22
  Add an optional config key (e.g. `propDrilling.ignoreComponents`) that extends it, so
12
23
  teams can register their own design-system primitives.
24
+
13
25
  - Touch: `src/core/types.ts`, `src/config/*`, `src/detectors/propDrilling.ts`, schema.
14
26
  - Verify: a test where a custom-ignored component is not counted.
15
27
 
16
- ### 2. Teach `large-component` to recognize more component forms
28
+ ### 2. Teach `large-component` to recognize more component forms — [#2](https://github.com/ColumbusLabs/DebtLens/issues/2)
29
+
17
30
  Today it only classifies PascalCase function/arrow components
18
31
  ([`src/utils/ast.ts`](../src/utils/ast.ts) `collectFunctionLikes`). It misses
19
32
  `memo(function X(){})`, `forwardRef(...)`, and class components.
33
+
20
34
  - Verify: fixtures for each form in `tests/detectors/largeComponent.test.ts`.
21
35
 
22
- ### 3. Reduce `naming-drift` false positives on domain-rich apps
36
+ ### 3. Reduce `naming-drift` false positives on domain-rich apps — [#3](https://github.com/ColumbusLabs/DebtLens/issues/3)
37
+
23
38
  The built-in media vocabulary treats distinct domain entities (e.g. `movie` vs `show`)
24
39
  as "competing names." Options: raise the default `minVariants`, add a config switch to
25
40
  disable the built-in pack, or require co-occurrence in the same identifier.
41
+
26
42
  - Touch: [`src/detectors/namingDrift.ts`](../src/detectors/namingDrift.ts).
27
43
  - Verify: a media-style fixture that should NOT fire by default.
28
44
 
29
- ### 4. Configurable markers for `todo-comment`
45
+ ### 4. Configurable markers for `todo-comment` — [#4](https://github.com/ColumbusLabs/DebtLens/issues/4)
46
+
30
47
  Allow projects to add/replace the marker patterns
31
48
  ([`src/detectors/todoComment.ts`](../src/detectors/todoComment.ts)) via config.
49
+
32
50
  - Verify: a custom marker fires; a removed default does not.
33
51
 
52
+ ### 15. Extend `effect-complexity` to layout/insertion effects — [#15](https://github.com/ColumbusLabs/DebtLens/issues/15)
53
+
54
+ - Touch: `src/detectors/effectComplexity.ts`, `tests/detectors/effectComplexity.test.ts`.
55
+ - Verify: long `useLayoutEffect` fires; small `useInsertionEffect` does not.
56
+
57
+ ### 27. Warn when `duplicate-logic` truncates comparisons — [#27](https://github.com/ColumbusLabs/DebtLens/issues/27)
58
+
59
+ - Touch: `src/detectors/duplicateLogic.ts`.
60
+ - Verify: exceeding `maxSnippets` emits a single clear warning.
61
+
34
62
  ## Reporters & integrations
35
63
 
36
- ### 5. Add `helpUri` to SARIF rules
64
+ | # | Task | Issue |
65
+ | --- | --- | --- |
66
+ | 5 | Add `helpUri` to SARIF rules | [#5](https://github.com/ColumbusLabs/DebtLens/issues/5) |
67
+ | 6 | Snapshot test for the Markdown reporter | [#6](https://github.com/ColumbusLabs/DebtLens/issues/6) |
68
+ | 7 | Publish the config JSON schema to a stable URL | [#7](https://github.com/ColumbusLabs/DebtLens/issues/7) |
69
+ | 16 | JSON reporter contract test | [#16](https://github.com/ColumbusLabs/DebtLens/issues/16) |
70
+ | 22 | PR comment reporter for Markdown findings | [#22](https://github.com/ColumbusLabs/DebtLens/issues/22) |
71
+
72
+ ### 5. Add `helpUri` to SARIF rules — [#5](https://github.com/ColumbusLabs/DebtLens/issues/5)
73
+
37
74
  In [`src/reporters/sarifReporter.ts`](../src/reporters/sarifReporter.ts), point each
38
75
  rule's `helpUri` at its section in `docs/rules.md` so code-scanning links to docs.
76
+
39
77
  - Verify: extend `tests/reporters/sarifReporter.test.ts`.
40
78
 
41
- ### 6. Snapshot test for the Markdown reporter
79
+ ### 6. Snapshot test for the Markdown reporter — [#6](https://github.com/ColumbusLabs/DebtLens/issues/6)
80
+
42
81
  Add a fixture-based test that scans `examples/react` and asserts the Markdown matches a
43
82
  committed snapshot (normalizing the elapsed-ms line), guarding `docs/example-report.md`.
44
83
 
45
- ### 7. Publish the config JSON schema to a stable URL
84
+ ### 7. Publish the config JSON schema to a stable URL — [#7](https://github.com/ColumbusLabs/DebtLens/issues/7)
85
+
46
86
  The schema is generated to `schema/debtlens.config.schema.json`
47
87
  ([`src/config/schema.ts`](../src/config/schema.ts)). Wire up hosting (e.g. GitHub Pages
48
88
  or SchemaStore) and confirm the `$schema` URL in the `init` template resolves.
49
89
 
90
+ ### 16. JSON reporter contract test — [#16](https://github.com/ColumbusLabs/DebtLens/issues/16)
91
+
92
+ - Touch: `src/reporters/jsonReporter.ts`, new `tests/reporters/jsonReporter.test.ts`.
93
+ - Verify: parsed output includes stable `issues`, `summary`, `options` keys.
94
+
95
+ ### 22. PR comment reporter — [#22](https://github.com/ColumbusLabs/DebtLens/issues/22)
96
+
97
+ Format scan results for GitHub PR comments (roadmap v0.3). Larger than a single rule tweak.
98
+
50
99
  ## CLI / DX
51
100
 
52
- ### 8. Add a summary-only / `--quiet` output mode
53
- Print just the counts line and exit code, useful for CI logs.
54
- - Touch: `src/cli/index.ts`, `src/reporters/terminalReporter.ts`.
101
+ | # | Task | Issue | Status |
102
+ | --- | --- | --- | --- |
103
+ | 8 | Summary-only `--quiet` output mode | [#8](https://github.com/ColumbusLabs/DebtLens/issues/8) | **Done** |
104
+ | 9 | Respect `.gitignore` when resolving files | [#9](https://github.com/ColumbusLabs/DebtLens/issues/9) | Open |
105
+ | 10 | False-positive guidance per rule in docs | [#10](https://github.com/ColumbusLabs/DebtLens/issues/10) | **Done** |
106
+ | 14 | Document `--quiet` in README and Action | [#14](https://github.com/ColumbusLabs/DebtLens/issues/14) | Open |
107
+ | 17 | Integration test for `scan()` on `examples/react` | [#17](https://github.com/ColumbusLabs/DebtLens/issues/17) | Open |
108
+ | 18 | Read CLI/SARIF version from `package.json` | [#18](https://github.com/ColumbusLabs/DebtLens/issues/18) | Open |
109
+ | 19 | `debtlens rules` command | [#19](https://github.com/ColumbusLabs/DebtLens/issues/19) | Open |
110
+ | 20 | Warn when scan resolves zero files | [#20](https://github.com/ColumbusLabs/DebtLens/issues/20) | Open |
111
+ | 21 | `--staged` mode for pre-commit scans | [#21](https://github.com/ColumbusLabs/DebtLens/issues/21) | Open |
112
+ | 24 | Action: `write-baseline`, `thresholds`, `max-files` | [#24](https://github.com/ColumbusLabs/DebtLens/issues/24) | Open |
113
+ | 28 | CI smoke scan for RN and Next examples | [#28](https://github.com/ColumbusLabs/DebtLens/issues/28) | Open |
114
+
115
+ ### 8. Add a summary-only / `--quiet` output mode — [#8](https://github.com/ColumbusLabs/DebtLens/issues/8) (closed)
116
+
117
+ Merged in PR #12. Terminal-only; prints header + summary, suppresses findings.
118
+
119
+ ### 9. Respect `.gitignore` when resolving files — [#9](https://github.com/ColumbusLabs/DebtLens/issues/9)
55
120
 
56
- ### 9. Respect `.gitignore` when resolving files
57
121
  Optionally skip files ignored by git during a scan, in addition to the configured
58
122
  `exclude` globs.
59
- - Touch: `src/core/scan.ts` (file resolution).
60
123
 
61
- ### 10. Document each rule's false-positive guidance
124
+ - Touch: `src/core/scan.ts`, `src/utils/git.ts`.
125
+
126
+ ### 10. Document each rule's false-positive guidance — [#10](https://github.com/ColumbusLabs/DebtLens/issues/10) (closed)
127
+
62
128
  Expand [`docs/rules.md`](./rules.md) with a "When this is a false positive" note per
63
129
  rule, mirroring the guards in the detector tests.
130
+
131
+ ### 14. Document `--quiet` in README and GitHub Action — [#14](https://github.com/ColumbusLabs/DebtLens/issues/14)
132
+
133
+ - Touch: `README.md`, `action.yml`.
134
+
135
+ ### 17. Integration test for `scan()` — [#17](https://github.com/ColumbusLabs/DebtLens/issues/17)
136
+
137
+ - Touch: `tests/core/scan.test.ts`, `examples/react/`.
138
+
139
+ ### 18. Single source of truth for version — [#18](https://github.com/ColumbusLabs/DebtLens/issues/18)
140
+
141
+ - Touch: `src/cli/index.ts`, `src/reporters/sarifReporter.ts`, `package.json`.
142
+
143
+ ### 19. `debtlens rules` command — [#19](https://github.com/ColumbusLabs/DebtLens/issues/19)
144
+
145
+ List rule ids, names, default severities, and descriptions.
146
+
147
+ ### 20. Warn on zero files scanned — [#20](https://github.com/ColumbusLabs/DebtLens/issues/20)
148
+
149
+ - Touch: `src/core/scan.ts`, `src/cli/index.ts`.
150
+
151
+ ### 21. `--staged` git mode — [#21](https://github.com/ColumbusLabs/DebtLens/issues/21)
152
+
153
+ - Touch: `src/utils/git.ts`, `src/cli/index.ts`.
154
+
155
+ ### 24. GitHub Action input gaps — [#24](https://github.com/ColumbusLabs/DebtLens/issues/24)
156
+
157
+ Expose `write-baseline`, `thresholds`, and `max-files` in `action.yml`.
158
+
159
+ ### 28. CI example coverage — [#28](https://github.com/ColumbusLabs/DebtLens/issues/28)
160
+
161
+ Scan `examples/react-native` and `examples/next` in `.github/workflows/ci.yml`.
162
+
163
+ ## Roadmap / larger work
164
+
165
+ | # | Task | Issue |
166
+ | --- | --- | --- |
167
+ | 23 | Monorepo and package-aware scanning | [#23](https://github.com/ColumbusLabs/DebtLens/issues/23) |
168
+ | 25 | Rule packs (`react`, `react-native`, `next`) | [#25](https://github.com/ColumbusLabs/DebtLens/issues/25) |
169
+ | 26 | Plugin API for third-party rules | [#26](https://github.com/ColumbusLabs/DebtLens/issues/26) |
170
+
171
+ These are multi-PR efforts; read the issue body before starting and comment if you plan
172
+ to own one.
package/docs/rules.md CHANGED
@@ -21,6 +21,11 @@ Good fixes:
21
21
  - move imperative workflows to named hooks
22
22
  - split independent features behind composition boundaries
23
23
 
24
+ When this is a false positive:
25
+
26
+ - the file is not actually a React-style component
27
+ - the component stays within the configured line, hook, and branch budgets
28
+
24
29
  ## `state-sprawl`
25
30
 
26
31
  Flags components/hooks with many calls to local stateful hooks such as `useState`, `useReducer`, and `useRef`.
@@ -38,6 +43,11 @@ Good fixes:
38
43
  - move server/cache state into the data layer
39
44
  - delete unused state before adding new state
40
45
 
46
+ When this is a false positive:
47
+
48
+ - the function is not classified as a component or hook
49
+ - the file stays at or below the configured stateful-hook threshold
50
+
41
51
  ## `effect-complexity`
42
52
 
43
53
  Flags long, branchy, or overloaded `useEffect` calls.
@@ -56,6 +66,11 @@ Good fixes:
56
66
  - move async workflows into named functions
57
67
  - use framework data loading where appropriate
58
68
 
69
+ When this is a false positive:
70
+
71
+ - the callback is small and focused
72
+ - the array literal belongs to another API instead of `useEffect`
73
+
59
74
  ## `duplicate-logic`
60
75
 
61
76
  Finds structurally similar functions/components after comments, identifiers, strings, and numeric literals are normalized.
@@ -75,6 +90,11 @@ Good fixes:
75
90
  - delete the weaker duplicate if it was accidental
76
91
  - keep duplication only when coupling would be worse than repetition
77
92
 
93
+ When this is a false positive:
94
+
95
+ - the compared snippets do materially different work after normalization
96
+ - the shared shape is too short to clear the minimum line-count threshold
97
+
78
98
  ## `dead-abstraction`
79
99
 
80
100
  Flags short wrappers that delegate to one call, return one value, or render one JSX element without meaningful behavior.
@@ -91,6 +111,11 @@ Good fixes:
91
111
  - keep it only if it is a stable domain boundary
92
112
  - add the missing behavior that justifies the abstraction
93
113
 
114
+ When this is a false positive:
115
+
116
+ - the wrapper adds meaningful behavior beyond a single pass-through statement
117
+ - the file is a route module or a hook wrapper that is intentionally thin by convention
118
+
94
119
  ## `prop-drilling`
95
120
 
96
121
  Flags components that forward many props to child components.
@@ -108,6 +133,11 @@ Good fixes:
108
133
  - extract a stable context for cross-cutting values
109
134
  - reduce prop surface area
110
135
 
136
+ When this is a false positive:
137
+
138
+ - the component forwards only a small number of props
139
+ - the props are passed only to host primitives instead of user-defined child components
140
+
111
141
  ## `todo-comment`
112
142
 
113
143
  Flags debt markers in comments, including TODO, FIXME, HACK, temporary, placeholder, and assistant-generation markers.
@@ -121,6 +151,11 @@ Good fixes:
121
151
  - fix the debt before more code depends on it
122
152
  - delete stale comments that no longer describe reality
123
153
 
154
+ When this is a false positive:
155
+
156
+ - the word appears in executable code or identifiers instead of a comment
157
+ - the comment is already paired with explicit tracking and removal criteria
158
+
124
159
  ## `naming-drift`
125
160
 
126
161
  Flags files where related domain concepts are represented by many competing names.
@@ -137,3 +172,8 @@ Good fixes:
137
172
  - rename adapters at system boundaries
138
173
  - document vocabulary in a module README
139
174
  - add typed domain models where possible
175
+
176
+ When this is a false positive:
177
+
178
+ - the file uses fewer distinct variants than the configured threshold
179
+ - the competing names belong to separate concepts rather than one overloaded domain term
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "debtlens",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Find maintainability debt common in fast-moving AI-assisted TypeScript, React, React Native, Expo, and Next.js codebases.",
5
5
  "type": "module",
6
6
  "homepage": "https://github.com/ColumbusLabs/DebtLens#readme",
@@ -111,6 +111,20 @@
111
111
  "type": "string"
112
112
  }
113
113
  }
114
+ },
115
+ "propDrilling": {
116
+ "type": "object",
117
+ "description": "Prop-drilling rule configuration.",
118
+ "properties": {
119
+ "ignoreComponents": {
120
+ "type": "array",
121
+ "items": {
122
+ "type": "string"
123
+ },
124
+ "description": "Additional UI primitive component names to ignore (extends built-in host components)."
125
+ }
126
+ },
127
+ "additionalProperties": false
114
128
  }
115
129
  }
116
130
  }