pr-checkmate 1.21.8 → 1.21.10
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/README.md +2 -2
- package/cspell.json +270 -1
- package/dist/config/constants.js +15 -1
- package/dist/config/loader.js +5 -0
- package/dist/scripts/commitlint.js +1 -1
- package/dist/scripts/index.js +1 -1
- package/dist/scripts/lint.js +1 -1
- package/dist/scripts/markdown-lint.js +1 -1
- package/dist/scripts/pr-summary.js +1 -1
- package/dist/scripts/security.js +1 -1
- package/dist/scripts/spellcheck.js +1 -1
- package/dist/scripts/typecheck.js +17 -1
- package/dist/utils/resolve-bin.js +8 -4
- package/eslint.config.mjs +3 -3
- package/package.json +3 -3
- package/src/config/cspell.json +270 -1
- package/src/config/eslint.config.mjs +3 -3
package/README.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
# ♟️ PR CheckMate
|
|
2
|
+
|
|
1
3
|

|
|
2
4
|

|
|
3
5
|

|
|
4
6
|
|
|
5
|
-
# ♟️ PR CheckMate
|
|
6
|
-
>
|
|
7
7
|
> **PR CheckMate** is an npm package for automating Pull Request checks.
|
|
8
8
|
> It helps teams maintain code quality by automatically validating linting, formatting, dependencies, security, and spelling before merging to `main`.
|
|
9
9
|
|
package/cspell.json
CHANGED
|
@@ -274,7 +274,276 @@
|
|
|
274
274
|
"פילינגים",
|
|
275
275
|
"פיניש",
|
|
276
276
|
"קלאסי",
|
|
277
|
-
"רטינול"
|
|
277
|
+
"רטינול",
|
|
278
|
+
"accesscode",
|
|
279
|
+
"adminsdk",
|
|
280
|
+
"akia",
|
|
281
|
+
"AKID",
|
|
282
|
+
"myorg",
|
|
283
|
+
"androidpublisher",
|
|
284
|
+
"apikey",
|
|
285
|
+
"apinick",
|
|
286
|
+
"cnick",
|
|
287
|
+
"ghactor",
|
|
288
|
+
"atts",
|
|
289
|
+
"apkg",
|
|
290
|
+
"BEHAVIOUR",
|
|
291
|
+
"appclinical",
|
|
292
|
+
"graphify",
|
|
293
|
+
"graphifyy",
|
|
294
|
+
"DTENSORFLOW",
|
|
295
|
+
"realtag",
|
|
296
|
+
"appoperator",
|
|
297
|
+
"appreglaur",
|
|
298
|
+
"apprequest",
|
|
299
|
+
"appsales",
|
|
300
|
+
"appstoreconnect",
|
|
301
|
+
"archs",
|
|
302
|
+
"artur",
|
|
303
|
+
"Ashwini",
|
|
304
|
+
"atlassian",
|
|
305
|
+
"auditq",
|
|
306
|
+
"avdmanager",
|
|
307
|
+
"avds",
|
|
308
|
+
"awscli",
|
|
309
|
+
"awscliv",
|
|
310
|
+
"pubspec",
|
|
311
|
+
"nios",
|
|
312
|
+
"awsconfiguration",
|
|
313
|
+
"baprs",
|
|
314
|
+
"bepkg",
|
|
315
|
+
"bioeye",
|
|
316
|
+
"bioeyesdkswift",
|
|
317
|
+
"bitbucket",
|
|
318
|
+
"bosb",
|
|
319
|
+
"braineye",
|
|
320
|
+
"braineyeandroid",
|
|
321
|
+
"braineyecore",
|
|
322
|
+
"braineyesdk",
|
|
323
|
+
"bscanf",
|
|
324
|
+
"buildx",
|
|
325
|
+
"CALVER",
|
|
326
|
+
"cdxgen",
|
|
327
|
+
"Cdxgen",
|
|
328
|
+
"ededed",
|
|
329
|
+
"ccache",
|
|
330
|
+
"centralised",
|
|
331
|
+
"chan",
|
|
332
|
+
"checkifemailexists",
|
|
333
|
+
"checkpointing",
|
|
334
|
+
"claudecode",
|
|
335
|
+
"cmdline",
|
|
336
|
+
"cmdtools",
|
|
337
|
+
"cocoapods",
|
|
338
|
+
"codeartifact",
|
|
339
|
+
"cognitogroup",
|
|
340
|
+
"completesession",
|
|
341
|
+
"completetest",
|
|
342
|
+
"confirmemail",
|
|
343
|
+
"confirmpassword",
|
|
344
|
+
"containerregistry",
|
|
345
|
+
"cpiav",
|
|
346
|
+
"createsession",
|
|
347
|
+
"createtest",
|
|
348
|
+
"ctest",
|
|
349
|
+
"customfield",
|
|
350
|
+
"cyclonedx",
|
|
351
|
+
"DBUILD",
|
|
352
|
+
"DCMAKE",
|
|
353
|
+
"dedup",
|
|
354
|
+
"deintegrate",
|
|
355
|
+
"Deintegrating",
|
|
356
|
+
"deleteuser",
|
|
357
|
+
"devuser",
|
|
358
|
+
"DFETCHCONTENT",
|
|
359
|
+
"disableuser",
|
|
360
|
+
"dockerization",
|
|
361
|
+
"Dorg",
|
|
362
|
+
"DTFLITE",
|
|
363
|
+
"dtypes",
|
|
364
|
+
"DTYPES",
|
|
365
|
+
"dumpsys",
|
|
366
|
+
"eigen",
|
|
367
|
+
"EIGEN",
|
|
368
|
+
"enableuser",
|
|
369
|
+
"eoilist",
|
|
370
|
+
"eyecon",
|
|
371
|
+
"eyetracking",
|
|
372
|
+
"eympact",
|
|
373
|
+
"farmhash",
|
|
374
|
+
"FARMHASH",
|
|
375
|
+
"FETCHCONTENT",
|
|
376
|
+
"ffprobe",
|
|
377
|
+
"fgets",
|
|
378
|
+
"filehistory",
|
|
379
|
+
"fixedname",
|
|
380
|
+
"flatbuffers",
|
|
381
|
+
"FLATBUFFERS",
|
|
382
|
+
"forgotpassword",
|
|
383
|
+
"Fsub",
|
|
384
|
+
"gemmlowp",
|
|
385
|
+
"GEMMLOWP",
|
|
386
|
+
"genkey",
|
|
387
|
+
"germany",
|
|
388
|
+
"getprop",
|
|
389
|
+
"ghsa",
|
|
390
|
+
"gnupg",
|
|
391
|
+
"Gowtham",
|
|
392
|
+
"gradlew",
|
|
393
|
+
"Hamou",
|
|
394
|
+
"Harel",
|
|
395
|
+
"hflip",
|
|
396
|
+
"Hossein",
|
|
397
|
+
"initialised",
|
|
398
|
+
"iphoneos",
|
|
399
|
+
"iphonesimulator",
|
|
400
|
+
"issuetype",
|
|
401
|
+
"johnsmith",
|
|
402
|
+
"jsqr",
|
|
403
|
+
"Jsqr",
|
|
404
|
+
"junitxml",
|
|
405
|
+
"jvmargs",
|
|
406
|
+
"keyalg",
|
|
407
|
+
"keypass",
|
|
408
|
+
"keysize",
|
|
409
|
+
"keytool",
|
|
410
|
+
"Khaing",
|
|
411
|
+
"konsultamd",
|
|
412
|
+
"lelvni",
|
|
413
|
+
"libexec",
|
|
414
|
+
"libopencv",
|
|
415
|
+
"libtensorflow",
|
|
416
|
+
"listapps",
|
|
417
|
+
"localised",
|
|
418
|
+
"logcat",
|
|
419
|
+
"lproj",
|
|
420
|
+
"lxgksa",
|
|
421
|
+
"Meaghan",
|
|
422
|
+
"metadatalist",
|
|
423
|
+
"Metaspace",
|
|
424
|
+
"mhvhic",
|
|
425
|
+
"mydir",
|
|
426
|
+
"myimage",
|
|
427
|
+
"mylib",
|
|
428
|
+
"myprefix",
|
|
429
|
+
"myrepo",
|
|
430
|
+
"mytoken",
|
|
431
|
+
"Naing",
|
|
432
|
+
"Namayeshi",
|
|
433
|
+
"nbraineye",
|
|
434
|
+
"NFIX",
|
|
435
|
+
"noprompt",
|
|
436
|
+
"noslash",
|
|
437
|
+
"oneline",
|
|
438
|
+
"Ooura",
|
|
439
|
+
"otherws",
|
|
440
|
+
"pagelen",
|
|
441
|
+
"Palaniswamy",
|
|
442
|
+
"pbxproj",
|
|
443
|
+
"pcodeartifact",
|
|
444
|
+
"Pickery",
|
|
445
|
+
"pipenv",
|
|
446
|
+
"podfile",
|
|
447
|
+
"poland",
|
|
448
|
+
"posthog",
|
|
449
|
+
"pthreadpool",
|
|
450
|
+
"pullrequests",
|
|
451
|
+
"pyproject",
|
|
452
|
+
"qscale",
|
|
453
|
+
"Ramesh",
|
|
454
|
+
"rawvideo",
|
|
455
|
+
"resendcode",
|
|
456
|
+
"samd",
|
|
457
|
+
"Sandino",
|
|
458
|
+
"Saurabh",
|
|
459
|
+
"sbom",
|
|
460
|
+
"sboms",
|
|
461
|
+
"scanf",
|
|
462
|
+
"sdkmanager",
|
|
463
|
+
"sess",
|
|
464
|
+
"setpassword",
|
|
465
|
+
"somerepo",
|
|
466
|
+
"Shani",
|
|
467
|
+
"simctl",
|
|
468
|
+
"stagingeu",
|
|
469
|
+
"storepass",
|
|
470
|
+
"retcode",
|
|
471
|
+
"Tukey",
|
|
472
|
+
"VIRTUALENVS",
|
|
473
|
+
"Δangle",
|
|
474
|
+
"strncpy",
|
|
475
|
+
"subjectid",
|
|
476
|
+
"subscriptionlist",
|
|
477
|
+
"swiftshader",
|
|
478
|
+
"Syncer",
|
|
479
|
+
"Talaiee",
|
|
480
|
+
"Tayebeh",
|
|
481
|
+
"tcwf",
|
|
482
|
+
"temurin",
|
|
483
|
+
"tensorflow",
|
|
484
|
+
"testsuite",
|
|
485
|
+
"testsuites",
|
|
486
|
+
"testuser",
|
|
487
|
+
"tfcommit",
|
|
488
|
+
"tflite",
|
|
489
|
+
"tocken",
|
|
490
|
+
"Turakhia",
|
|
491
|
+
"Tzionit",
|
|
492
|
+
"ubgjg",
|
|
493
|
+
"udid",
|
|
494
|
+
"unparseable",
|
|
495
|
+
"unrecognised",
|
|
496
|
+
"updateemail",
|
|
497
|
+
"userfound",
|
|
498
|
+
"myregistry",
|
|
499
|
+
"userid",
|
|
500
|
+
"userinfo",
|
|
501
|
+
"usermetadata",
|
|
502
|
+
"userproperty",
|
|
503
|
+
"uuids",
|
|
504
|
+
"vfrzk",
|
|
505
|
+
"vuhftgasouc",
|
|
506
|
+
"vulns",
|
|
507
|
+
"workdir",
|
|
508
|
+
"xcframework",
|
|
509
|
+
"xcodeproj",
|
|
510
|
+
"xcresult",
|
|
511
|
+
"xcresulttool",
|
|
512
|
+
"xcrun",
|
|
513
|
+
"xcstrings",
|
|
514
|
+
"xcworkspace",
|
|
515
|
+
"XNNPACK",
|
|
516
|
+
"DYLD",
|
|
517
|
+
"qreader",
|
|
518
|
+
"xoxb",
|
|
519
|
+
"bbox",
|
|
520
|
+
"Degs",
|
|
521
|
+
"Kanade",
|
|
522
|
+
"neighbours",
|
|
523
|
+
"unsharp",
|
|
524
|
+
"imgproc",
|
|
525
|
+
"highgui",
|
|
526
|
+
"imgcodecs",
|
|
527
|
+
"videoio",
|
|
528
|
+
"gapi",
|
|
529
|
+
"objdetect",
|
|
530
|
+
"behaviour",
|
|
531
|
+
"softfloat",
|
|
532
|
+
"CUDA",
|
|
533
|
+
"OPENCL",
|
|
534
|
+
"OPENNI",
|
|
535
|
+
"GSTREAMER",
|
|
536
|
+
"DWITH",
|
|
537
|
+
"DINSTALL",
|
|
538
|
+
"DPARALLEL",
|
|
539
|
+
"libavcodec",
|
|
540
|
+
"libavformat",
|
|
541
|
+
"libavutil",
|
|
542
|
+
"libswscale",
|
|
543
|
+
"Makefiles",
|
|
544
|
+
"dpdm",
|
|
545
|
+
"commitlintrc",
|
|
546
|
+
"shortstat"
|
|
278
547
|
],
|
|
279
548
|
"ignorePaths": [
|
|
280
549
|
"**/node_modules/**",
|
package/dist/config/constants.js
CHANGED
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.CONFIG_FILE = exports.documentation = exports.DEFAULT_COMMANDS = exports.SOURCE_EXTENSIONS = exports.CONFIG_FILE_PATTERNS = exports.IGNORE_PATTERNS = void 0;
|
|
6
|
+
exports.CONFIG_FILE = exports.documentation = exports.DEFAULT_ALLOW_PACKAGES = exports.DEFAULT_COMMANDS = exports.SOURCE_EXTENSIONS = exports.CONFIG_FILE_PATTERNS = exports.IGNORE_PATTERNS = void 0;
|
|
7
7
|
const node_path_1 = __importDefault(require("node:path"));
|
|
8
8
|
/**
|
|
9
9
|
* Common patterns to ignore in all checks
|
|
@@ -89,6 +89,20 @@ exports.DEFAULT_COMMANDS = {
|
|
|
89
89
|
'npx pr-checkmate pr-body': 'Validate PR description',
|
|
90
90
|
'npx pr-checkmate duplicate': 'Detect duplicate code blocks (jscpd)',
|
|
91
91
|
};
|
|
92
|
+
/**
|
|
93
|
+
* Packages allow-listed for the license check by default.
|
|
94
|
+
*
|
|
95
|
+
* These are pr-checkmate's own bundled cspell dictionaries. Some ship under
|
|
96
|
+
* copyleft licenses (GPL/LGPL), but they are pr-checkmate dependencies — not
|
|
97
|
+
* the consumer's — so clients should never have to allow-list them manually.
|
|
98
|
+
*/
|
|
99
|
+
exports.DEFAULT_ALLOW_PACKAGES = [
|
|
100
|
+
'@cspell/dict-es-es',
|
|
101
|
+
'@cspell/dict-fr-fr',
|
|
102
|
+
'@cspell/dict-he',
|
|
103
|
+
'@cspell/dict-ru_ru',
|
|
104
|
+
'@cspell/dict-uk-ua',
|
|
105
|
+
];
|
|
92
106
|
exports.documentation = {
|
|
93
107
|
eslint: 'https://eslint.org/docs/latest/rules/',
|
|
94
108
|
typescriptEslint: 'https://typescript-eslint.io/rules/',
|
package/dist/config/loader.js
CHANGED
|
@@ -9,6 +9,7 @@ exports.getDefaultConfig = getDefaultConfig;
|
|
|
9
9
|
const node_fs_1 = __importDefault(require("node:fs"));
|
|
10
10
|
const node_path_1 = __importDefault(require("node:path"));
|
|
11
11
|
const utils_1 = require("../utils");
|
|
12
|
+
const constants_1 = require("./constants");
|
|
12
13
|
/**
|
|
13
14
|
* Load project configuration from pr-checkmate.json
|
|
14
15
|
* Falls back to defaults if not found
|
|
@@ -145,6 +146,10 @@ function getDefaultConfig() {
|
|
|
145
146
|
'build',
|
|
146
147
|
],
|
|
147
148
|
},
|
|
149
|
+
licenseCheck: {
|
|
150
|
+
allowPackages: [...constants_1.DEFAULT_ALLOW_PACKAGES],
|
|
151
|
+
allowLicenses: [],
|
|
152
|
+
},
|
|
148
153
|
};
|
|
149
154
|
}
|
|
150
155
|
/**
|
|
@@ -77,7 +77,7 @@ async function runCommitlint() {
|
|
|
77
77
|
result_collector_1.resultCollector.register('Commitlint', 'skip');
|
|
78
78
|
return;
|
|
79
79
|
}
|
|
80
|
-
utils_1.logger.info('[runCommitlint]:
|
|
80
|
+
utils_1.logger.info('[runCommitlint]: Running commitlint...');
|
|
81
81
|
const commitlintBin = (0, utils_1.resolvePackageBin)('@commitlint/cli', 'cli.js');
|
|
82
82
|
const hasLocal = (0, config_1.hasLocalConfig)(LOCAL_CONFIG_FILES);
|
|
83
83
|
let tempConfigFile = null;
|
package/dist/scripts/index.js
CHANGED
package/dist/scripts/lint.js
CHANGED
|
@@ -21,7 +21,7 @@ async function getESLintMajorVersion() {
|
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
async function runLint() {
|
|
24
|
-
utils_1.logger.info('[runLint]:
|
|
24
|
+
utils_1.logger.info('[runLint]: Running ESLint...');
|
|
25
25
|
const eslintBin = (0, utils_1.resolvePackageBin)('eslint', 'bin/eslint.js');
|
|
26
26
|
const projectRoot = process.cwd();
|
|
27
27
|
const sourcePath = (0, config_1.getSourcePath)();
|
|
@@ -33,7 +33,7 @@ function buildMergedConfig(bundledConfigPath, userRules) {
|
|
|
33
33
|
return tmpFile;
|
|
34
34
|
}
|
|
35
35
|
async function runMarkdownLint() {
|
|
36
|
-
utils_1.logger.info('[runMarkdownLint]:
|
|
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
39
|
let targets;
|
|
@@ -45,7 +45,7 @@ function buildMarkdownReport(results) {
|
|
|
45
45
|
.join('\n');
|
|
46
46
|
return [
|
|
47
47
|
COMMENT_MARKER,
|
|
48
|
-
'##
|
|
48
|
+
'## PR CheckMate Summary',
|
|
49
49
|
'',
|
|
50
50
|
`**${passed} passed** · **${warned} warnings** · **${failed} failed** · **${skipped} skipped**`,
|
|
51
51
|
'',
|
package/dist/scripts/security.js
CHANGED
|
@@ -53,7 +53,7 @@ async function getBaseSha() {
|
|
|
53
53
|
* Run security scan for secrets
|
|
54
54
|
*/
|
|
55
55
|
async function runSecurityScan() {
|
|
56
|
-
utils_1.logger.info('
|
|
56
|
+
utils_1.logger.info('Running security scan with gitleaks-secret-scanner...');
|
|
57
57
|
try {
|
|
58
58
|
const headSha = await getHeadSha();
|
|
59
59
|
if (!headSha) {
|
|
@@ -101,7 +101,7 @@ async function runSpellcheck() {
|
|
|
101
101
|
let tempConfigPath = null;
|
|
102
102
|
const cspellBin = (0, utils_1.resolvePackageBin)('cspell', 'bin.mjs');
|
|
103
103
|
if (hasLocal) {
|
|
104
|
-
utils_1.logger.info(
|
|
104
|
+
utils_1.logger.info(`Using local cspell config (checking: ${sourcePath})`);
|
|
105
105
|
args = [...patterns, '--no-progress'];
|
|
106
106
|
}
|
|
107
107
|
else {
|
|
@@ -9,6 +9,22 @@ const utils_1 = require("../utils");
|
|
|
9
9
|
const loader_1 = require("../config/loader");
|
|
10
10
|
const node_fs_1 = __importDefault(require("node:fs"));
|
|
11
11
|
const node_path_1 = __importDefault(require("node:path"));
|
|
12
|
+
/**
|
|
13
|
+
* Resolves the `tsc` binary, preferring the consumer project's own TypeScript so its
|
|
14
|
+
* tsconfig is compiled by the version it was written for. Falls back to the TypeScript
|
|
15
|
+
* bundled with pr-checkmate when the project has no local install.
|
|
16
|
+
*/
|
|
17
|
+
function resolveTsc() {
|
|
18
|
+
try {
|
|
19
|
+
const localTsc = (0, utils_1.resolvePackageBin)('typescript', 'bin/tsc', { paths: [process.cwd()] });
|
|
20
|
+
utils_1.logger.info("[runTypecheck]: Using project's local TypeScript");
|
|
21
|
+
return localTsc;
|
|
22
|
+
}
|
|
23
|
+
catch {
|
|
24
|
+
utils_1.logger.info('[runTypecheck]: No local TypeScript found, using bundled compiler');
|
|
25
|
+
return (0, utils_1.resolvePackageBin)('typescript', 'bin/tsc');
|
|
26
|
+
}
|
|
27
|
+
}
|
|
12
28
|
async function runTypecheck() {
|
|
13
29
|
const cfg = (0, loader_1.loadProjectConfig)();
|
|
14
30
|
if (cfg.typecheck?.enabled === false) {
|
|
@@ -21,7 +37,7 @@ async function runTypecheck() {
|
|
|
21
37
|
utils_1.logger.info('[runTypecheck]: No tsconfig.json found, skipping');
|
|
22
38
|
return;
|
|
23
39
|
}
|
|
24
|
-
const tscBin = (
|
|
40
|
+
const tscBin = resolveTsc();
|
|
25
41
|
const result = await (0, execa_1.execa)(process.execPath, [tscBin, '--noEmit'], { reject: false });
|
|
26
42
|
if (result.exitCode !== 0) {
|
|
27
43
|
const output = [result.stdout, result.stderr].filter(Boolean).join('\n');
|
|
@@ -13,21 +13,25 @@ const node_fs_1 = __importDefault(require("node:fs"));
|
|
|
13
13
|
* 1. Direct subpath — fast path for packages that explicitly export their bin
|
|
14
14
|
* 2. Via package.json — for packages that export ./package.json but not the bin subpath (e.g. eslint)
|
|
15
15
|
* 3. Walk up from main entry — for packages that export neither (e.g. cspell)
|
|
16
|
+
*
|
|
17
|
+
* @param options.paths - Directories to resolve from (passed to `require.resolve`).
|
|
18
|
+
* Use `[process.cwd()]` to prefer the consumer project's copy of the package.
|
|
16
19
|
*/
|
|
17
|
-
function resolvePackageBin(pkgName, binRelPath) {
|
|
20
|
+
function resolvePackageBin(pkgName, binRelPath, options) {
|
|
21
|
+
const resolveOpts = options?.paths ? { paths: options.paths } : undefined;
|
|
18
22
|
// 1. Direct subpath
|
|
19
23
|
try {
|
|
20
|
-
return require.resolve(`${pkgName}/${binRelPath}
|
|
24
|
+
return require.resolve(`${pkgName}/${binRelPath}`, resolveOpts);
|
|
21
25
|
}
|
|
22
26
|
catch { }
|
|
23
27
|
// 2. Via package.json
|
|
24
28
|
try {
|
|
25
|
-
const pkgJsonPath = require.resolve(`${pkgName}/package.json
|
|
29
|
+
const pkgJsonPath = require.resolve(`${pkgName}/package.json`, resolveOpts);
|
|
26
30
|
return node_path_1.default.join(node_path_1.default.dirname(pkgJsonPath), binRelPath);
|
|
27
31
|
}
|
|
28
32
|
catch { }
|
|
29
33
|
// 3. Walk up from main entry to find package root by matching package name
|
|
30
|
-
const main = require.resolve(pkgName);
|
|
34
|
+
const main = require.resolve(pkgName, resolveOpts);
|
|
31
35
|
let dir = node_path_1.default.dirname(main);
|
|
32
36
|
while (dir !== node_path_1.default.dirname(dir)) {
|
|
33
37
|
const pkgJsonPath = node_path_1.default.join(dir, 'package.json');
|
package/eslint.config.mjs
CHANGED
|
@@ -82,7 +82,7 @@ function loadUserConfig() {
|
|
|
82
82
|
console.warn(`[loadUserConfig]: ⚠️ Failed to parse ${configPath}:`, err.message);
|
|
83
83
|
}
|
|
84
84
|
} else {
|
|
85
|
-
console.error(`[loadUserConfig]:
|
|
85
|
+
console.error(`[loadUserConfig]: No pr-checkmate.json found, using defaults`);
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
return { sourcePath: 'src', eslint: {} };
|
|
@@ -110,13 +110,13 @@ const customRulesCount = Object.keys(userConfig.eslint?.rules || {}).length;
|
|
|
110
110
|
const customIgnoresCount = (userConfig.eslint?.ignorePatterns || []).length;
|
|
111
111
|
|
|
112
112
|
if (customRulesCount > 0) {
|
|
113
|
-
console.error(
|
|
113
|
+
console.error(`Applied ${customRulesCount} custom ESLint rules`);
|
|
114
114
|
}
|
|
115
115
|
if (customIgnoresCount > 0) {
|
|
116
116
|
console.error(`🚫 Applied ${customIgnoresCount} custom ignore patterns`);
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
-
console.error(
|
|
119
|
+
console.error(`ESLint checking: ${SRC}/**/*.{ts,tsx,js,jsx}`);
|
|
120
120
|
|
|
121
121
|
export default [
|
|
122
122
|
// Global ignores must be in a separate config object
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pr-checkmate",
|
|
3
|
-
"version": "1.21.
|
|
3
|
+
"version": "1.21.10",
|
|
4
4
|
"description": "Automated PR quality checks: linting, formatting, dependency analysis, and spellcheck",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"github-actions",
|
|
@@ -66,12 +66,12 @@
|
|
|
66
66
|
"@cspell/dict-he": "^4.0.2",
|
|
67
67
|
"@cspell/dict-ru_ru": "^2.2.1",
|
|
68
68
|
"@cspell/dict-uk-ua": "^4.0.0",
|
|
69
|
-
"@types/node": "^
|
|
69
|
+
"@types/node": "^26.1.0",
|
|
70
70
|
"@typescript-eslint/eslint-plugin": "^8.47.0",
|
|
71
71
|
"@typescript-eslint/parser": "^8.47.0",
|
|
72
72
|
"cspell": "^9.3.2",
|
|
73
73
|
"eslint": "^9.26.0",
|
|
74
|
-
"eslint-config-prettier": "^
|
|
74
|
+
"eslint-config-prettier": "^10.1.8",
|
|
75
75
|
"eslint-plugin-import": "^2.29.0",
|
|
76
76
|
"eslint-plugin-prettier": "^5.5.4",
|
|
77
77
|
"execa": "^9.6.0",
|
package/src/config/cspell.json
CHANGED
|
@@ -274,7 +274,276 @@
|
|
|
274
274
|
"פילינגים",
|
|
275
275
|
"פיניש",
|
|
276
276
|
"קלאסי",
|
|
277
|
-
"רטינול"
|
|
277
|
+
"רטינול",
|
|
278
|
+
"accesscode",
|
|
279
|
+
"adminsdk",
|
|
280
|
+
"akia",
|
|
281
|
+
"AKID",
|
|
282
|
+
"myorg",
|
|
283
|
+
"androidpublisher",
|
|
284
|
+
"apikey",
|
|
285
|
+
"apinick",
|
|
286
|
+
"cnick",
|
|
287
|
+
"ghactor",
|
|
288
|
+
"atts",
|
|
289
|
+
"apkg",
|
|
290
|
+
"BEHAVIOUR",
|
|
291
|
+
"appclinical",
|
|
292
|
+
"graphify",
|
|
293
|
+
"graphifyy",
|
|
294
|
+
"DTENSORFLOW",
|
|
295
|
+
"realtag",
|
|
296
|
+
"appoperator",
|
|
297
|
+
"appreglaur",
|
|
298
|
+
"apprequest",
|
|
299
|
+
"appsales",
|
|
300
|
+
"appstoreconnect",
|
|
301
|
+
"archs",
|
|
302
|
+
"artur",
|
|
303
|
+
"Ashwini",
|
|
304
|
+
"atlassian",
|
|
305
|
+
"auditq",
|
|
306
|
+
"avdmanager",
|
|
307
|
+
"avds",
|
|
308
|
+
"awscli",
|
|
309
|
+
"awscliv",
|
|
310
|
+
"pubspec",
|
|
311
|
+
"nios",
|
|
312
|
+
"awsconfiguration",
|
|
313
|
+
"baprs",
|
|
314
|
+
"bepkg",
|
|
315
|
+
"bioeye",
|
|
316
|
+
"bioeyesdkswift",
|
|
317
|
+
"bitbucket",
|
|
318
|
+
"bosb",
|
|
319
|
+
"braineye",
|
|
320
|
+
"braineyeandroid",
|
|
321
|
+
"braineyecore",
|
|
322
|
+
"braineyesdk",
|
|
323
|
+
"bscanf",
|
|
324
|
+
"buildx",
|
|
325
|
+
"CALVER",
|
|
326
|
+
"cdxgen",
|
|
327
|
+
"Cdxgen",
|
|
328
|
+
"ededed",
|
|
329
|
+
"ccache",
|
|
330
|
+
"centralised",
|
|
331
|
+
"chan",
|
|
332
|
+
"checkifemailexists",
|
|
333
|
+
"checkpointing",
|
|
334
|
+
"claudecode",
|
|
335
|
+
"cmdline",
|
|
336
|
+
"cmdtools",
|
|
337
|
+
"cocoapods",
|
|
338
|
+
"codeartifact",
|
|
339
|
+
"cognitogroup",
|
|
340
|
+
"completesession",
|
|
341
|
+
"completetest",
|
|
342
|
+
"confirmemail",
|
|
343
|
+
"confirmpassword",
|
|
344
|
+
"containerregistry",
|
|
345
|
+
"cpiav",
|
|
346
|
+
"createsession",
|
|
347
|
+
"createtest",
|
|
348
|
+
"ctest",
|
|
349
|
+
"customfield",
|
|
350
|
+
"cyclonedx",
|
|
351
|
+
"DBUILD",
|
|
352
|
+
"DCMAKE",
|
|
353
|
+
"dedup",
|
|
354
|
+
"deintegrate",
|
|
355
|
+
"Deintegrating",
|
|
356
|
+
"deleteuser",
|
|
357
|
+
"devuser",
|
|
358
|
+
"DFETCHCONTENT",
|
|
359
|
+
"disableuser",
|
|
360
|
+
"dockerization",
|
|
361
|
+
"Dorg",
|
|
362
|
+
"DTFLITE",
|
|
363
|
+
"dtypes",
|
|
364
|
+
"DTYPES",
|
|
365
|
+
"dumpsys",
|
|
366
|
+
"eigen",
|
|
367
|
+
"EIGEN",
|
|
368
|
+
"enableuser",
|
|
369
|
+
"eoilist",
|
|
370
|
+
"eyecon",
|
|
371
|
+
"eyetracking",
|
|
372
|
+
"eympact",
|
|
373
|
+
"farmhash",
|
|
374
|
+
"FARMHASH",
|
|
375
|
+
"FETCHCONTENT",
|
|
376
|
+
"ffprobe",
|
|
377
|
+
"fgets",
|
|
378
|
+
"filehistory",
|
|
379
|
+
"fixedname",
|
|
380
|
+
"flatbuffers",
|
|
381
|
+
"FLATBUFFERS",
|
|
382
|
+
"forgotpassword",
|
|
383
|
+
"Fsub",
|
|
384
|
+
"gemmlowp",
|
|
385
|
+
"GEMMLOWP",
|
|
386
|
+
"genkey",
|
|
387
|
+
"germany",
|
|
388
|
+
"getprop",
|
|
389
|
+
"ghsa",
|
|
390
|
+
"gnupg",
|
|
391
|
+
"Gowtham",
|
|
392
|
+
"gradlew",
|
|
393
|
+
"Hamou",
|
|
394
|
+
"Harel",
|
|
395
|
+
"hflip",
|
|
396
|
+
"Hossein",
|
|
397
|
+
"initialised",
|
|
398
|
+
"iphoneos",
|
|
399
|
+
"iphonesimulator",
|
|
400
|
+
"issuetype",
|
|
401
|
+
"johnsmith",
|
|
402
|
+
"jsqr",
|
|
403
|
+
"Jsqr",
|
|
404
|
+
"junitxml",
|
|
405
|
+
"jvmargs",
|
|
406
|
+
"keyalg",
|
|
407
|
+
"keypass",
|
|
408
|
+
"keysize",
|
|
409
|
+
"keytool",
|
|
410
|
+
"Khaing",
|
|
411
|
+
"konsultamd",
|
|
412
|
+
"lelvni",
|
|
413
|
+
"libexec",
|
|
414
|
+
"libopencv",
|
|
415
|
+
"libtensorflow",
|
|
416
|
+
"listapps",
|
|
417
|
+
"localised",
|
|
418
|
+
"logcat",
|
|
419
|
+
"lproj",
|
|
420
|
+
"lxgksa",
|
|
421
|
+
"Meaghan",
|
|
422
|
+
"metadatalist",
|
|
423
|
+
"Metaspace",
|
|
424
|
+
"mhvhic",
|
|
425
|
+
"mydir",
|
|
426
|
+
"myimage",
|
|
427
|
+
"mylib",
|
|
428
|
+
"myprefix",
|
|
429
|
+
"myrepo",
|
|
430
|
+
"mytoken",
|
|
431
|
+
"Naing",
|
|
432
|
+
"Namayeshi",
|
|
433
|
+
"nbraineye",
|
|
434
|
+
"NFIX",
|
|
435
|
+
"noprompt",
|
|
436
|
+
"noslash",
|
|
437
|
+
"oneline",
|
|
438
|
+
"Ooura",
|
|
439
|
+
"otherws",
|
|
440
|
+
"pagelen",
|
|
441
|
+
"Palaniswamy",
|
|
442
|
+
"pbxproj",
|
|
443
|
+
"pcodeartifact",
|
|
444
|
+
"Pickery",
|
|
445
|
+
"pipenv",
|
|
446
|
+
"podfile",
|
|
447
|
+
"poland",
|
|
448
|
+
"posthog",
|
|
449
|
+
"pthreadpool",
|
|
450
|
+
"pullrequests",
|
|
451
|
+
"pyproject",
|
|
452
|
+
"qscale",
|
|
453
|
+
"Ramesh",
|
|
454
|
+
"rawvideo",
|
|
455
|
+
"resendcode",
|
|
456
|
+
"samd",
|
|
457
|
+
"Sandino",
|
|
458
|
+
"Saurabh",
|
|
459
|
+
"sbom",
|
|
460
|
+
"sboms",
|
|
461
|
+
"scanf",
|
|
462
|
+
"sdkmanager",
|
|
463
|
+
"sess",
|
|
464
|
+
"setpassword",
|
|
465
|
+
"somerepo",
|
|
466
|
+
"Shani",
|
|
467
|
+
"simctl",
|
|
468
|
+
"stagingeu",
|
|
469
|
+
"storepass",
|
|
470
|
+
"retcode",
|
|
471
|
+
"Tukey",
|
|
472
|
+
"VIRTUALENVS",
|
|
473
|
+
"Δangle",
|
|
474
|
+
"strncpy",
|
|
475
|
+
"subjectid",
|
|
476
|
+
"subscriptionlist",
|
|
477
|
+
"swiftshader",
|
|
478
|
+
"Syncer",
|
|
479
|
+
"Talaiee",
|
|
480
|
+
"Tayebeh",
|
|
481
|
+
"tcwf",
|
|
482
|
+
"temurin",
|
|
483
|
+
"tensorflow",
|
|
484
|
+
"testsuite",
|
|
485
|
+
"testsuites",
|
|
486
|
+
"testuser",
|
|
487
|
+
"tfcommit",
|
|
488
|
+
"tflite",
|
|
489
|
+
"tocken",
|
|
490
|
+
"Turakhia",
|
|
491
|
+
"Tzionit",
|
|
492
|
+
"ubgjg",
|
|
493
|
+
"udid",
|
|
494
|
+
"unparseable",
|
|
495
|
+
"unrecognised",
|
|
496
|
+
"updateemail",
|
|
497
|
+
"userfound",
|
|
498
|
+
"myregistry",
|
|
499
|
+
"userid",
|
|
500
|
+
"userinfo",
|
|
501
|
+
"usermetadata",
|
|
502
|
+
"userproperty",
|
|
503
|
+
"uuids",
|
|
504
|
+
"vfrzk",
|
|
505
|
+
"vuhftgasouc",
|
|
506
|
+
"vulns",
|
|
507
|
+
"workdir",
|
|
508
|
+
"xcframework",
|
|
509
|
+
"xcodeproj",
|
|
510
|
+
"xcresult",
|
|
511
|
+
"xcresulttool",
|
|
512
|
+
"xcrun",
|
|
513
|
+
"xcstrings",
|
|
514
|
+
"xcworkspace",
|
|
515
|
+
"XNNPACK",
|
|
516
|
+
"DYLD",
|
|
517
|
+
"qreader",
|
|
518
|
+
"xoxb",
|
|
519
|
+
"bbox",
|
|
520
|
+
"Degs",
|
|
521
|
+
"Kanade",
|
|
522
|
+
"neighbours",
|
|
523
|
+
"unsharp",
|
|
524
|
+
"imgproc",
|
|
525
|
+
"highgui",
|
|
526
|
+
"imgcodecs",
|
|
527
|
+
"videoio",
|
|
528
|
+
"gapi",
|
|
529
|
+
"objdetect",
|
|
530
|
+
"behaviour",
|
|
531
|
+
"softfloat",
|
|
532
|
+
"CUDA",
|
|
533
|
+
"OPENCL",
|
|
534
|
+
"OPENNI",
|
|
535
|
+
"GSTREAMER",
|
|
536
|
+
"DWITH",
|
|
537
|
+
"DINSTALL",
|
|
538
|
+
"DPARALLEL",
|
|
539
|
+
"libavcodec",
|
|
540
|
+
"libavformat",
|
|
541
|
+
"libavutil",
|
|
542
|
+
"libswscale",
|
|
543
|
+
"Makefiles",
|
|
544
|
+
"dpdm",
|
|
545
|
+
"commitlintrc",
|
|
546
|
+
"shortstat"
|
|
278
547
|
],
|
|
279
548
|
"ignorePaths": [
|
|
280
549
|
"**/node_modules/**",
|
|
@@ -82,7 +82,7 @@ function loadUserConfig() {
|
|
|
82
82
|
console.warn(`[loadUserConfig]: ⚠️ Failed to parse ${configPath}:`, err.message);
|
|
83
83
|
}
|
|
84
84
|
} else {
|
|
85
|
-
console.error(`[loadUserConfig]:
|
|
85
|
+
console.error(`[loadUserConfig]: No pr-checkmate.json found, using defaults`);
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
return { sourcePath: 'src', eslint: {} };
|
|
@@ -110,13 +110,13 @@ const customRulesCount = Object.keys(userConfig.eslint?.rules || {}).length;
|
|
|
110
110
|
const customIgnoresCount = (userConfig.eslint?.ignorePatterns || []).length;
|
|
111
111
|
|
|
112
112
|
if (customRulesCount > 0) {
|
|
113
|
-
console.error(
|
|
113
|
+
console.error(`Applied ${customRulesCount} custom ESLint rules`);
|
|
114
114
|
}
|
|
115
115
|
if (customIgnoresCount > 0) {
|
|
116
116
|
console.error(`🚫 Applied ${customIgnoresCount} custom ignore patterns`);
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
-
console.error(
|
|
119
|
+
console.error(`ESLint checking: ${SRC}/**/*.{ts,tsx,js,jsx}`);
|
|
120
120
|
|
|
121
121
|
export default [
|
|
122
122
|
// Global ignores must be in a separate config object
|