Repository navigation
chore: clean-up - #15506
Merged
Merged
chore: clean-up#15506
Conversation
…ctest` The rule factory sat under a second `// MAIN //` header, leaving the file with two MAIN sections. Removed the stray header so the factory stays in the already-open FUNCTIONS section and `// MAIN //` introduces only the rule object, matching 118 of 125 siblings (94.4%). Comment-only change; the exported rule object and its `meta` are unchanged. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J5voNUyxQDwCnzfVNhTqxA
…require-spacing` Corrected two layout deviations: - `lib/main.js`: the rule factory sat under a second `// MAIN //` header, leaving two MAIN sections. Removed the stray header so the factory stays in the FUNCTIONS section (94.4% of siblings). - `lib/index.js`: hoisted the `@module` documentation block above `// MODULES //`, removed the `// MAIN //` header, and renamed the local binding from `rule` to `main`. Each of these three matched 124 of 125 siblings (99.2%); this was the only package deviating on any of them. No behavior change; `module.exports` resolves to the same rule object. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J5voNUyxQDwCnzfVNhTqxA
…ce-aligned-asterisks` The rule factory sat under a `// MAIN //` header and the rule object under a second one, leaving the file with two MAIN sections and no FUNCTIONS section. Retitled the first header to `// FUNCTIONS //`, matching 118 of 125 siblings (94.4%). `// FUNCTIONS //` is an accepted header in the repository's own `stdlib/section-headers` rule. Comment-only change; the exported rule object and its `meta` are unchanged. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J5voNUyxQDwCnzfVNhTqxA
…-spaces` The function assigned to the rule's `create` property was named `create`. Renamed it to `main`, matching 124 of 125 siblings (99.2%); this was the only package using a different name. Nothing reads the function's `name` property: tests and examples consume only the exported rule object, and the ESLint plugin registry addresses rules by string id. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J5voNUyxQDwCnzfVNhTqxA
kgryte
approved these changes
Sep 24, 2026
_tools/eslint/rules packages
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This pull request:
@stdlib/_tools/eslint/rulespackages so that theirlib/files follow the section-header and naming conventions used by the rest of the namespace. All changes are comment-only or local-identifier renames; no rule behavior, public signature, or test expectation changes.Namespace summary
@stdlib/_tools/eslint/rulesDo not manually editmarkers are the standard auto-populated READMESee Alsocomment)package.jsontop-level keys, README section list and order,lib/main.jssection-header sequence,lib/index.jssection-header sequence and@moduleblock placement, rule-factory naming, rule-factory JSDoc tag set, rule object top-level keys,meta.docskeys,meta.typepresencemeta.fixable(72.8% absent),meta.schemalength (72.0% zero-length),lib/dependency set (no dependency reached 75%; highest was@stdlib/assert/is-objectat 58.4%),package.jsonscriptskeys andstdlibkeys (uniformly empty/absent, no signal)_tools/eslint/rules/jsdoc-doctestRemoved the duplicate
// MAIN //header inlib/main.js: the rule factory now stays under// FUNCTIONS //, and// MAIN //introduces only the exported rule object, matching the namespace's dominant pattern (118/125 packages, 94.4%). Comment-only change; the rule object and itsmetaare untouched._tools/eslint/rules/jsdoc-example-require-spacinglib/main.jshad a duplicate// MAIN //header wrapping the rule factory; removed it and folded the factory back into// FUNCTIONS //, matching 118/125 packages (94.4%).lib/index.jsdeviated on three conventions at once —@moduleblock placed below// MODULES //, an extraneous// MAIN //header, and the local binding namedruleinstead ofmain— each convention holding in 124/125 packages (99.2%), with this the sole outlier on all three. Corrected all three;module.exportsstill resolves to the same rule object, no behavior change._tools/eslint/rules/jsdoc-no-space-aligned-asterisksIn
lib/main.js, the first// MAIN //header — over the rule factory — is retitled// FUNCTIONS //;// MAIN //now applies solely to the exported rule object, matching the pattern used in 118 of 125 packages (94.4%).// FUNCTIONS //is an accepted header per the repository's ownstdlib/section-headersrule. Comment-only change; the rule object and itsmetaare untouched._tools/eslint/rules/require-spacesIn
lib/main.js, the function assigned to the rule'screateproperty is renamed fromcreatetomain. This brings the package in line with 124 of 125 packages in the namespace (99.2% conformance);require-spaceswas the sole outlier. Nothing depends on the function'sname: tests and examples consume only the exported rule object, and ESLint's plugin registry resolves rules by string id.Related Issues
No.
Questions
No.
Other
Validation
Checked:
package.jsonkey sets, README section lists and order, andtest/,benchmark/,examples/file naming.metashape recovered by loading every package; section headers, rule-factory JSDoc tag sets,lib/index.jslayout, andrequire()dependency sets extracted from source across all 125 members. Per-package extraction agents were run over 40 of 125 packages (every candidate outlier plus a random control set) and agreed with the deterministic extraction on every field of every package.etc/eslint/rules/stdlib.jsdepend on the deviating behavior?), and structural review (is the majority pattern actually the right thing to apply?).node --checkon all five modified files; every modified package still loads and exports{meta, create}with an unchangedmetaobject.Deliberately excluded:
meta.type(20 packages). The majority pattern is the absence ofmeta.type(105/125, 84.0%), but all 20 deviating packages use valid ESLint core enum values. Removing correct metadata to match a majority would be a regression.@privateon the rule factory (2 packages). Same shape: the majority pattern is absence (123/125, 98.4%), so the "correction" would be deleting documentation. Not applied.test/fixtures/unvalidated.js(6 packages). Present in 119/125 (95.2%), but none of the six packages'test/test.jsreferences such a fixture. Adding the file alone would create an orphan; the real gap is a missing third test case whose applicability varies per rule. Out of scope — needs human judgment.package.jsonbinkey (3 packages). Present in 122/125 (97.6%) within the namespace, but in only 9.3% of stdlib packages overall — an internal_toolsconvention rather than a stdlib-wide one, so its absence is not treated as drift.jsdoc-ordered-list-marker-style,jsdoc-typedef-typos, andrequire-last-path-relativeexport an inline object literal rather than assigning to arulevariable. Converting them is a multi-line restructure rather than a mechanical correction, so it was left out of this pass._tools/eslint/rules/doctest. Has the same duplicate-// MAIN //shape asjsdoc-doctest, butdoctest/lib/main.jsis already modified by open PR fix: prevent doctest false-positive on function declarations; remove stale ESLint disable #11928, so it was left alone to avoid a conflicting edit.require-spacesREADME<section class="related">. Missing where 124/125 packages have it, but that section is auto-populated by the package generator and is not hand-edited.tapeandeslintare not installed in the environment this branch was prepared in, so the packages' own test suites were not executed locally; CI covers them.Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
This PR was authored by Claude Code. It ran an automated cross-package drift analysis over the
_tools/eslint/rulesnamespace, extracted structural and semantic features from all 125 member packages, computed per-feature majority patterns at a 75% threshold, and applied the resulting corrections. Candidate corrections were filtered through automated review passes before being applied, and the excluded findings are listed under "Other" above. Reviewers should verify the section-header conventions and therequire-spacesfactory rename against their own expectations for the namespace.@stdlib-js/reviewers
Generated by Claude Code