From b5be0bbc432fd59bf76c4b5a3912631df7399ab3 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 24 Sep 2026 16:51:45 +0000 Subject: [PATCH 1/4] refactor: drop duplicate MAIN header in `_tools/eslint/rules/jsdoc-doctest` 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 Claude-Session: https://claude.ai/code/session_01J5voNUyxQDwCnzfVNhTqxA --- .../@stdlib/_tools/eslint/rules/jsdoc-doctest/lib/main.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/node_modules/@stdlib/_tools/eslint/rules/jsdoc-doctest/lib/main.js b/lib/node_modules/@stdlib/_tools/eslint/rules/jsdoc-doctest/lib/main.js index cec8697cbad6..04e9af38ab02 100644 --- a/lib/node_modules/@stdlib/_tools/eslint/rules/jsdoc-doctest/lib/main.js +++ b/lib/node_modules/@stdlib/_tools/eslint/rules/jsdoc-doctest/lib/main.js @@ -115,9 +115,6 @@ function findName( scope, expected ) { return '?'; } - -// MAIN // - /** * Rule for validating that return annotations in example code match the actual output. * From 1c622881d6ad1e8eaddb669dfcf97539f5a9ec32 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 24 Sep 2026 16:51:52 +0000 Subject: [PATCH 2/4] refactor: reorder lib sections in `_tools/eslint/rules/jsdoc-example-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 Claude-Session: https://claude.ai/code/session_01J5voNUyxQDwCnzfVNhTqxA --- .../jsdoc-example-require-spacing/lib/index.js | 14 ++++++-------- .../jsdoc-example-require-spacing/lib/main.js | 3 --- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/lib/node_modules/@stdlib/_tools/eslint/rules/jsdoc-example-require-spacing/lib/index.js b/lib/node_modules/@stdlib/_tools/eslint/rules/jsdoc-example-require-spacing/lib/index.js index c65d6877d487..b017baf036b6 100644 --- a/lib/node_modules/@stdlib/_tools/eslint/rules/jsdoc-example-require-spacing/lib/index.js +++ b/lib/node_modules/@stdlib/_tools/eslint/rules/jsdoc-example-require-spacing/lib/index.js @@ -18,13 +18,6 @@ 'use strict'; -// MODULES // - -var rule = require( './main.js' ); - - -// MAIN // - /** * ESLint rule to enforce empty lines between `require` statements and code in JSDoc examples. * @@ -40,6 +33,11 @@ var rule = require( './main.js' ); * }; */ +// MODULES // + +var main = require( './main.js' ); + + // EXPORTS // -module.exports = rule; +module.exports = main; diff --git a/lib/node_modules/@stdlib/_tools/eslint/rules/jsdoc-example-require-spacing/lib/main.js b/lib/node_modules/@stdlib/_tools/eslint/rules/jsdoc-example-require-spacing/lib/main.js index b1f21a947e80..f3686e5ebc6e 100644 --- a/lib/node_modules/@stdlib/_tools/eslint/rules/jsdoc-example-require-spacing/lib/main.js +++ b/lib/node_modules/@stdlib/_tools/eslint/rules/jsdoc-example-require-spacing/lib/main.js @@ -62,9 +62,6 @@ function isEmpty( line ) { return trim( line ) === ''; } - -// MAIN // - /** * Rule to enforce empty lines between `require` statements and code in JSDoc examples. * From f392cd1a353b7e5ae303df283288b9f4c98a20da Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 24 Sep 2026 16:51:58 +0000 Subject: [PATCH 3/4] refactor: correct section header in `_tools/eslint/rules/jsdoc-no-space-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 Claude-Session: https://claude.ai/code/session_01J5voNUyxQDwCnzfVNhTqxA --- .../eslint/rules/jsdoc-no-space-aligned-asterisks/lib/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/_tools/eslint/rules/jsdoc-no-space-aligned-asterisks/lib/main.js b/lib/node_modules/@stdlib/_tools/eslint/rules/jsdoc-no-space-aligned-asterisks/lib/main.js index 257e492c9f65..4f5195a973ab 100644 --- a/lib/node_modules/@stdlib/_tools/eslint/rules/jsdoc-no-space-aligned-asterisks/lib/main.js +++ b/lib/node_modules/@stdlib/_tools/eslint/rules/jsdoc-no-space-aligned-asterisks/lib/main.js @@ -30,7 +30,7 @@ var RE_LEADING_SPACE = /^[ ]+(\*|$)/gm; var rule; -// MAIN // +// FUNCTIONS // /** * Rule for validating that JSDoc comments do not have space-aligned asterisks. From 0a0831cced40060331ab45295879f9fbb76a81a5 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 24 Sep 2026 16:52:04 +0000 Subject: [PATCH 4/4] refactor: rename rule factory to main in `_tools/eslint/rules/require-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 Claude-Session: https://claude.ai/code/session_01J5voNUyxQDwCnzfVNhTqxA --- .../@stdlib/_tools/eslint/rules/require-spaces/lib/main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/node_modules/@stdlib/_tools/eslint/rules/require-spaces/lib/main.js b/lib/node_modules/@stdlib/_tools/eslint/rules/require-spaces/lib/main.js index 86966db51dc6..7681713200d1 100644 --- a/lib/node_modules/@stdlib/_tools/eslint/rules/require-spaces/lib/main.js +++ b/lib/node_modules/@stdlib/_tools/eslint/rules/require-spaces/lib/main.js @@ -31,7 +31,7 @@ var rule; * @param {Object} context - ESLint context * @returns {Object} validators */ -function create( context ) { +function main( context ) { /** * Reports the error message. * @@ -108,7 +108,7 @@ rule = { 'fixable': 'whitespace', 'schema': [] }, - 'create': create + 'create': main };