pr-checkmate 1.23.21 → 1.23.23

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.
@@ -34,18 +34,6 @@
34
34
  }
35
35
  ],
36
36
  "import/no-duplicates": "error",
37
- "jsdoc/require-jsdoc": [
38
- "warn",
39
- {
40
- "publicOnly": true,
41
- "require": {
42
- "FunctionDeclaration": true,
43
- "MethodDefinition": true,
44
- "ClassDeclaration": true,
45
- "ArrowFunctionExpression": false
46
- }
47
- }
48
- ],
49
37
  "jsdoc/check-param-names": "warn",
50
38
  "jsdoc/check-tag-names": "warn",
51
39
  "jsdoc/check-types": "warn",
package/eslint.config.mjs CHANGED
@@ -26,6 +26,28 @@ import jsdocPlugin from 'eslint-plugin-jsdoc';
26
26
  * `eslint.rules: { "prettier/prettier": "error" }` or
27
27
  * `severity: { "Prettier": "error" }` in pr-checkmate.json.
28
28
  *
29
+ * FIXERS THAT FABRICATE CONTENT ARE NOT SHIPPED. `jsdoc/require-jsdoc` used to be in
30
+ * this set at `warn`, and it is auto-fixable — but unlike `prettier/prettier`, whose
31
+ * fixer produces the right answer, this one has no answer to produce. It writes an
32
+ * empty stub:
33
+ *
34
+ * \/**
35
+ * *
36
+ * *\/
37
+ *
38
+ * which satisfies the rule permanently. The check runs in write mode by default
39
+ * outside CI, so one run stamped 150 stubs across one client's `src` and reported zero
40
+ * warnings; inside CI the auto-format commit pushes them back to the branch, so
41
+ * deleting them by hand never holds. The rule therefore reported a real gap once, and
42
+ * from then on guaranteed that every public method looked documented while none of it
43
+ * was — the signal destroyed by the same run that raised it.
44
+ *
45
+ * Whether a method is worth explaining is a judgement a fixer cannot make. The three
46
+ * `jsdoc/check-*` rules stay: they validate docblocks that already exist and fix only
47
+ * within them, so they never invent content. Documentation coverage, if a repo wants
48
+ * to enforce it, belongs in review — or in `eslint.rules` of its own pr-checkmate.json,
49
+ * where whoever turns it on knows what the fixer will do.
50
+ *
29
51
  * A JSON file cannot carry this note, hence it lives here; `src/config/.eslintrc.js`
30
52
  * holds the same rule set for the legacy ESLint <9 path and must stay in sync.
31
53
  */
@@ -100,6 +122,24 @@ const customIgnoresCount = (userConfig.eslint?.ignorePatterns || []).length;
100
122
  if (customRulesCount > 0) {
101
123
  console.error(`Applied ${customRulesCount} custom ESLint rules`);
102
124
  }
125
+
126
+ // A `pr-checkmate.json` written by an older `init` contains a VERBATIM COPY of the
127
+ // bundled rule set — all of it, severities included. Client rules merge on top of
128
+ // the defaults, so that copy silently pins every severity forever: a repo in this
129
+ // state keeps failing on `prettier/prettier: error` long after the bundled default
130
+ // became `warn`, and nothing in the output says why. Detected by rule NAMES rather
131
+ // than values (nobody hand-writes exactly this list), and reported where the person
132
+ // reading a failed lint run will actually see it.
133
+ const defaultRuleNames = Object.keys(defaultRules);
134
+ const userRuleNames = Object.keys(userConfig.eslint?.rules || {});
135
+ if (defaultRuleNames.every(name => userRuleNames.includes(name))) {
136
+ console.error(
137
+ `⚠️ eslint.rules in pr-checkmate.json lists all ${defaultRuleNames.length} built-in rules — ` +
138
+ 'a copy written by an older `init`. It overrides the bundled defaults, so updates to them ' +
139
+ '(formatting is advisory since 1.23.21) never reach this repo. Delete the block to track ' +
140
+ 'the defaults again, or keep it to pin these severities deliberately.',
141
+ );
142
+ }
103
143
  if (customIgnoresCount > 0) {
104
144
  console.error(`🚫 Applied ${customIgnoresCount} custom ignore patterns`);
105
145
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pr-checkmate",
3
- "version": "1.23.21",
4
- "description": "Automated PR quality checks: linting, formatting, dependency analysis, and spellcheck",
3
+ "version": "1.23.23",
4
+ "description": "Security-first PR gate for CI: secret scanning, grype dependency scanning, SBOM — plus linting and formatting across 11 languages",
5
5
  "keywords": [
6
6
  "github-actions",
7
7
  "pull-request",
@@ -120,8 +120,8 @@
120
120
  "tar": "7.5.22",
121
121
  "axios": "1.18.1",
122
122
  "form-data": "4.0.6",
123
- "brace-expansion": "5.0.8",
124
- "fast-uri": "4.1.1",
123
+ "brace-expansion": "5.0.9",
124
+ "fast-uri": "4.1.2",
125
125
  "follow-redirects": "1.16.0",
126
126
  "lodash": "4.18.1",
127
127
  "minimatch": "10.2.5",
@@ -93,19 +93,9 @@ module.exports = {
93
93
  },
94
94
  ],
95
95
  'import-x/no-duplicates': 'error',
96
- // Documentation (#62)
97
- 'jsdoc/require-jsdoc': [
98
- 'warn',
99
- {
100
- publicOnly: true,
101
- require: {
102
- FunctionDeclaration: true,
103
- MethodDefinition: true,
104
- ClassDeclaration: true,
105
- ArrowFunctionExpression: false,
106
- },
107
- },
108
- ],
96
+ // Documentation (#62). `jsdoc/require-jsdoc` is deliberately absent — see the
97
+ // note in eslint-flat-config.mjs. These three check docblocks that exist and
98
+ // fix only inside them; they never fabricate one.
109
99
  'jsdoc/check-param-names': 'warn',
110
100
  'jsdoc/check-tag-names': 'warn',
111
101
  'jsdoc/check-types': 'warn',