Skip to content

eslint-factory: 6 shipped rules are undocumented in README (13 of 19 documented) #46355

Description

@github-actions

Summary

eslint-factory/src/index.ts now registers 19 rules, but eslint-factory/README.md only documents 13 of them. The following six rules are wired into the plugin and firing against actions/setup/js/**/*.cjs, yet have no README section describing their detected forms, out-of-scope cases, and safe alternatives:

  1. no-core-exportvariable-non-string
  2. no-throw-plain-object
  3. require-mkdirsync-try-catch
  4. require-new-url-try-catch
  5. require-return-after-core-setfailed
  6. require-spawnsync-error-check

This is a documentation-only gap — the rules themselves are well-tested and behave correctly against the current corpus (see grounding note). But the README is the single source of truth contributors reach for when a rule fires, and six undocumented rules means six diagnostics with no companion "why / detected forms / out-of-scope / safe alternative" reference.

Why it matters

Several of these rules have deliberately narrow scopes and documented limitations that are only discoverable by reading the source (e.g. require-return-after-core-setfailed accepts break/continue as control transfers even though they do not stop post-loop execution; require-new-url-try-catch exempts import.meta.url and only offers an autofix for ExpressionStatement/ReturnStatement positions; require-spawnsync-error-check only recognizes .error checked in a real guard position, not in &&-right / || / ?? / logging positions). Contributors who hit these diagnostics without README coverage are likely to file false "this rule is wrong" reports.

Acceptance criteria

  • Add a README section for each of the six rules above, matching the existing section style (rule name heading, one-paragraph rationale, Detected forms / Out of scope / Safe alternative where applicable).
  • For each rule, the documented detected-forms and out-of-scope lists match the rule's tests (each section should be traceable to *.test.ts valid/invalid cases).
  • Document the known limitations that already exist as code comments: break/continue acceptance in require-return-after-core-setfailed; import.meta.url exemption + VariableDeclaration no-autofix in require-new-url-try-catch; guard-position requirement (and the intentional non-recognition of &&-right / || / ?? / logging) in require-spawnsync-error-check; the JSON-RPC { code: <negative int literal>, message, data? } exemption in no-throw-plain-object.
  • (Optional) Add a short table at the top of the Rules section mapping every registered rule in index.ts to its README anchor, so future drift (registered-but-undocumented) is easy to spot.

Grounding / verification

  • Registered rules counted from eslint-factory/src/index.ts plugin.rules map (19 entries).
  • Documented rules counted from eslint-factory/README.md (### <rule> headings): 13.
  • The six listed rules appear in index.ts but have no matching README heading.

Generated by 🤖 ESLint Refiner · 626.4 AIC · ⌖ 13.1 AIC · ⊞ 4.6K ·

  • expires on Jul 24, 2026, 10:13 PM UTC-08:00

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions