@techninja/clearstack 0.4.30 → 0.4.31
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/lib/watch-violations.js +4 -0
- package/package.json +1 -1
package/lib/watch-violations.js
CHANGED
|
@@ -50,7 +50,11 @@ export function extractViolations(row, projectDir) {
|
|
|
50
50
|
if (row.pass) return [];
|
|
51
51
|
if (row.result?.violations?.length) {
|
|
52
52
|
return row.result.violations.map((v) => {
|
|
53
|
+
// Ruff-style: { file, lines: string[] }
|
|
54
|
+
if (Array.isArray(v.lines)) return [v.file, ...v.lines];
|
|
55
|
+
// Import alias violations
|
|
53
56
|
if (v.spec !== undefined) return [v.file, `import '${v.spec}' → use #prefix/ alias`];
|
|
57
|
+
// Line-limit violations
|
|
54
58
|
const candidates = splitCandidates(resolve(projectDir, v.file));
|
|
55
59
|
return [v.file, `${v.lines} lines (max ${v.max}, +${v.lines - v.max} over)`, ...candidates];
|
|
56
60
|
});
|
package/package.json
CHANGED