bahlint 28.58.69340007 → 28.58.69340008
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/bin/bahlint.js +33 -14
- package/package.json +1 -1
package/bin/bahlint.js
CHANGED
|
@@ -320,25 +320,44 @@ ${getErrorMessage(error)}`;
|
|
|
320
320
|
// Output the results in the requested format with colors
|
|
321
321
|
if (totalProblems > 0) {
|
|
322
322
|
console.log(`${ORANGE}⚠ ${totalProblems} problems found${RESET}`);
|
|
323
|
-
if (actualFixedProblems > 0) {
|
|
323
|
+
if (actualFixedProblems > 0 || fixedFiles > 0) {
|
|
324
324
|
console.log(
|
|
325
325
|
`${GREEN}✓ Auto-fixed ${actualFixedProblems} problems in ${fixedFiles} file(s)${RESET}`,
|
|
326
326
|
);
|
|
327
|
-
|
|
328
|
-
//
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
327
|
+
|
|
328
|
+
// List the files that were fixed
|
|
329
|
+
if (fixedFiles > 0) {
|
|
330
|
+
const fixedFileNames = results
|
|
331
|
+
.filter(result => typeof result.output === "string")
|
|
332
|
+
.map(result => {
|
|
333
|
+
// Extract just the filename from the full path
|
|
334
|
+
const filePathParts = result.filePath.split('/');
|
|
335
|
+
return filePathParts[filePathParts.length - 1];
|
|
336
|
+
});
|
|
337
|
+
|
|
338
|
+
if (fixedFileNames.length > 0) {
|
|
339
|
+
console.log(`${GRAY} - ${fixedFileNames.join('\n- ')}${RESET}`);
|
|
340
|
+
}
|
|
341
|
+
}
|
|
332
342
|
}
|
|
333
343
|
} else if (isFixMode && (actualFixedProblems > 0 || fixedFiles > 0)) {
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
344
|
+
console.log(
|
|
345
|
+
`${GREEN}✓ Auto-fixed ${actualFixedProblems} problems in ${fixedFiles} file(s)${RESET}`,
|
|
346
|
+
);
|
|
347
|
+
|
|
348
|
+
// List the files that were fixed
|
|
349
|
+
if (fixedFiles > 0) {
|
|
350
|
+
const fixedFileNames = results
|
|
351
|
+
.filter(result => typeof result.output === "string")
|
|
352
|
+
.map(result => {
|
|
353
|
+
// Extract just the filename from the full path
|
|
354
|
+
const filePathParts = result.filePath.split('/');
|
|
355
|
+
return filePathParts[filePathParts.length - 1];
|
|
356
|
+
});
|
|
357
|
+
|
|
358
|
+
if (fixedFileNames.length > 0) {
|
|
359
|
+
console.log(`${GREEN}- ${fixedFileNames.join('\n- ')}${RESET}`);
|
|
360
|
+
}
|
|
342
361
|
}
|
|
343
362
|
}
|
|
344
363
|
} else {
|