pr-checkmate 1.21.4 → 1.21.5

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.
@@ -36,7 +36,25 @@ async function runMarkdownLint() {
36
36
  utils_1.logger.info('[runMarkdownLint]: 📝 Running Markdown lint...');
37
37
  const root = process.cwd();
38
38
  const changedFiles = await (0, delta_1.getChangedFiles)(['.md', '.mdx']);
39
- const targets = changedFiles ?? [`${root}/**/*.md`];
39
+ let targets;
40
+ if (changedFiles !== null) {
41
+ targets = changedFiles;
42
+ }
43
+ else {
44
+ // Use git ls-files to get only tracked .md files — naturally excludes .gitignore and untracked dirs
45
+ try {
46
+ const { stdout } = await (0, execa_1.execa)('git', ['ls-files', '*.md', '**/*.md'], { cwd: root, reject: false });
47
+ const tracked = stdout.split('\n').map(f => f.trim()).filter(f => f.endsWith('.md'));
48
+ targets = tracked.length > 0 ? tracked : [];
49
+ }
50
+ catch {
51
+ targets = [`${root}/**/*.md`];
52
+ }
53
+ }
54
+ if (targets.length === 0) {
55
+ utils_1.logger.info('[runMarkdownLint]: ✅ No markdown files to check');
56
+ return;
57
+ }
40
58
  const userConfig = loadUserMarkdownConfig();
41
59
  const userRules = userConfig.rules ?? {};
42
60
  const hasUserRules = Object.keys(userRules).length > 0;
@@ -63,12 +81,15 @@ async function runMarkdownLint() {
63
81
  const ignorePath = node_fs_1.default.existsSync(gitignorePath) ? ['--ignore-path', gitignorePath] : [];
64
82
  const args = [
65
83
  'markdownlint',
84
+ '--fix',
66
85
  ...targets,
67
86
  ...configArg,
68
87
  ...ignorePath,
69
88
  '--ignore', 'node_modules',
70
89
  '--ignore', 'dist',
71
90
  '--ignore', 'coverage',
91
+ '--ignore', 'graphify-out',
92
+ '--ignore', '.claude',
72
93
  ...extraIgnores,
73
94
  ];
74
95
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pr-checkmate",
3
- "version": "1.21.4",
3
+ "version": "1.21.5",
4
4
  "description": "Automated PR quality checks: linting, formatting, dependency analysis, and spellcheck",
5
5
  "keywords": [
6
6
  "github-actions",