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.
Files changed (2) hide show
  1. package/bin/bahlint.js +33 -14
  2. 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
- } else if (fixedFiles > 0) {
328
- // Fallback for suggestion-based fixes where fixable* counts stay 0
329
- console.log(
330
- `${GREEN}✓ Auto-fixed problems in ${fixedFiles} file(s)${RESET}`,
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
- if (actualFixedProblems > 0) {
335
- console.log(
336
- `${GREEN}✓ Auto-fixed ${actualFixedProblems} problems in ${fixedFiles} file(s)${RESET}`,
337
- );
338
- } else {
339
- console.log(
340
- `${GREEN}✓ Auto-fixed problems in ${fixedFiles} file(s)${RESET}`,
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 {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bahlint",
3
- "version": "28.58.69340007",
3
+ "version": "28.58.69340008",
4
4
  "author": "Nicholas C. Zakas <nicholas+npm@nczconsulting.com>",
5
5
  "description": "An AST-based pattern checker for JavaScript.",
6
6
  "type": "commonjs",