@theholocron/astromech 4.16.3 → 4.16.4

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/dist/index.d.mts CHANGED
@@ -417,10 +417,14 @@ declare const LINTERS: Record<string, LinterDef>;
417
417
  /** Every linter name the registry knows. */
418
418
  declare const LINTER_NAMES: ReadonlySet<string>;
419
419
  /**
420
- * Resolve the linter set for a repo. An `explicit` list (from
421
- * `config.tasks`) wins verbatim; otherwise every `always` linter plus every
422
- * linter whose `detect` filenames are present at the repo root. Result is
423
- * ordered by {@link LINTERS} declaration order.
420
+ * Resolve the linter set for a repo. An `explicit` list (from `config.tasks`)
421
+ * picks the candidate set; otherwise the candidates are every `always` linter
422
+ * plus every `detect`-gated linter whose filenames are present at the repo
423
+ * root. Either way, a `detect`-gated linter (eslint, markdownlint) only makes
424
+ * the final set when its config file is actually present — a repo can't run
425
+ * eslint without an `eslint.config.*`, and super-linter FATALs if you ask it
426
+ * to (theholocron/holocron#654). `always` linters are unconditional. Result
427
+ * is ordered by {@link LINTERS} declaration order.
424
428
  *
425
429
  * @throws when an `explicit` name is not in the registry — a typo is a
426
430
  * config bug, not a linter to silently skip.
package/dist/index.mjs CHANGED
@@ -190,30 +190,32 @@ const LINTERS = {
190
190
  /** Every linter name the registry knows. */
191
191
  const LINTER_NAMES = new Set(Object.keys(LINTERS));
192
192
  /**
193
- * Resolve the linter set for a repo. An `explicit` list (from
194
- * `config.tasks`) wins verbatim; otherwise every `always` linter plus every
195
- * linter whose `detect` filenames are present at the repo root. Result is
196
- * ordered by {@link LINTERS} declaration order.
193
+ * Resolve the linter set for a repo. An `explicit` list (from `config.tasks`)
194
+ * picks the candidate set; otherwise the candidates are every `always` linter
195
+ * plus every `detect`-gated linter whose filenames are present at the repo
196
+ * root. Either way, a `detect`-gated linter (eslint, markdownlint) only makes
197
+ * the final set when its config file is actually present — a repo can't run
198
+ * eslint without an `eslint.config.*`, and super-linter FATALs if you ask it
199
+ * to (theholocron/holocron#654). `always` linters are unconditional. Result
200
+ * is ordered by {@link LINTERS} declaration order.
197
201
  *
198
202
  * @throws when an `explicit` name is not in the registry — a typo is a
199
203
  * config bug, not a linter to silently skip.
200
204
  */
201
205
  function resolveLinters(opts) {
202
206
  const order = Object.keys(LINTERS);
207
+ const present = new Set(opts.rootFiles);
208
+ const configPresent = (def) => def.always === true || (def.detect ?? []).some((f) => present.has(f));
203
209
  if (opts.explicit && opts.explicit.length > 0) {
204
210
  const unknown = opts.explicit.filter((n) => !LINTER_NAMES.has(n));
205
211
  if (unknown.length > 0) throw new Error(`unknown linter${unknown.length > 1 ? "s" : ""} ${unknown.map((n) => `"${n}"`).join(", ")} — known: ${order.join(", ")}`);
206
212
  const wanted = new Set(opts.explicit);
207
- return order.filter((n) => wanted.has(n)).map((name) => ({
213
+ return order.filter((n) => wanted.has(n) && configPresent(LINTERS[n])).map((name) => ({
208
214
  name,
209
215
  def: LINTERS[name]
210
216
  }));
211
217
  }
212
- const present = new Set(opts.rootFiles);
213
- return order.filter((name) => {
214
- const def = LINTERS[name];
215
- return def.always === true || def.detect.some((f) => present.has(f));
216
- }).map((name) => ({
218
+ return order.filter((name) => configPresent(LINTERS[name])).map((name) => ({
217
219
  name,
218
220
  def: LINTERS[name]
219
221
  }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theholocron/astromech",
3
- "version": "4.16.3",
3
+ "version": "4.16.4",
4
4
  "description": "The Holocron task runner — one task manifest drives `holocron run`, `holocron ci`, the CI workflows, package.json scripts, linters, and required checks.",
5
5
  "keywords": [
6
6
  "ci",
@@ -37,7 +37,7 @@
37
37
  "dist"
38
38
  ],
39
39
  "dependencies": {
40
- "@theholocron/datapad": "4.16.3"
40
+ "@theholocron/datapad": "4.16.4"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@theholocron/eslint-config": "^8.0.0",
@@ -53,7 +53,7 @@
53
53
  "tsdown": "^0.22.14",
54
54
  "typescript": "^5.9.3",
55
55
  "vitest": "^4.1.11",
56
- "@theholocron/rollup-plugin-transform-template": "4.16.3"
56
+ "@theholocron/rollup-plugin-transform-template": "4.16.4"
57
57
  },
58
58
  "engines": {
59
59
  "node": ">=22"