Skip to content

chore: fix no-empty-lines-between-requires in test files#11474

Merged
kgryte merged 1 commit intostdlib-js:developfrom
GuneetGill:fix/js-lint-empty-lines-requires
Apr 16, 2026
Merged

chore: fix no-empty-lines-between-requires in test files#11474
kgryte merged 1 commit intostdlib-js:developfrom
GuneetGill:fix/js-lint-empty-lines-requires

Conversation

@GuneetGill
Copy link
Copy Markdown
Contributor

@GuneetGill GuneetGill commented Apr 16, 2026

Resolves #11472

Description

What is the purpose of this pull request?

This pull request:

  • Fixes stdlib/no-empty-lines-between-requires ESLint errors reported by the JavaScript lint workflow for two test files.
  • In lib/node_modules/@stdlib/_tools/lint/pkg-json-names/test/test.lint.js, moves var lint = require( './../lib/lint.js' ); into the // MODULES // section with the other top-level require declarations, so a later require is not separated from an earlier one by non-require statements (the rule treats consecutive module-level requires across intervening code as a violation when blank lines appear between them).
  • In lib/node_modules/@stdlib/blas/base/gsyr/test/test.ndarray.js, removes the empty line between the rcap and cu fixture require lines so adjacent requires are not split by a blank line.

This pull request has the following related issues:

Checklist

Please ensure the following tasks are completed before submitting this pull request.

AI Assistance

When authoring the changes proposed in this PR, did you use any kind of AI assistance?

  • Yes
  • No

If you answered "yes" above, how did you use AI assistance?

  • Code generation (e.g., when writing an implementation or fixing a bug)
  • Test/benchmark generation
  • Documentation (including examples)
  • Research and understanding

Disclosure

If you answered "yes" to using AI assistance, please provide a short disclosure indicating how you used AI assistance. This helps reviewers determine how much scrutiny to apply when reviewing your contribution. Example disclosures: "This PR was written primarily by Claude Code." or "I consulted ChatGPT to understand the codebase, but the proposed changes were fully authored manually by myself.".

Changes were made using Cursor IDE: locating the failing rule. I reviewed the diff and ran local ESLint on the touched files where the environment allowed.


@stdlib-js/reviewers

Questions

The file lib/node_modules/@stdlib/blas/base/gsyr/test/test.ndarray.js may still report an ESLint max-lines warning when linted with the test config (file length over the configured limit). That predates / is separate from the stdlib/no-empty-lines-between-requires fixes here.

Should I fix max-lines in this PR, or open a separate change?

Move pkg-json-names lint require into MODULES block; remove blank line
between adjacent fixture requires in gsyr ndarray tests.

Made-with: Cursor
@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label Apr 16, 2026
@stdlib-bot
Copy link
Copy Markdown
Contributor

Hello! Thank you for your contribution to stdlib.

We noticed that the contributing guidelines acknowledgment is missing from your pull request. Here's what you need to do:

  1. Please read our contributing guidelines.

  2. Update your pull request description to include this checked box:

    - [x] Read, understood, and followed the [contributing guidelines](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md)

This acknowledgment confirms that you've read the guidelines, which include:

  • The developer's certificate of origin
  • Your agreement to license your contributions under the project's terms

We can't review or accept contributions without this acknowledgment.

Thank you for your understanding and cooperation. We look forward to reviewing your contribution!

@stdlib-bot
Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
blas/base/gsyr $\color{green}507/507$
$\color{green}+100.00%$
$\color{green}65/65$
$\color{green}+100.00%$
$\color{green}4/4$
$\color{green}+100.00%$
$\color{green}507/507$
$\color{green}+100.00%$

The above coverage report was generated for the changes in this PR.

@stdlib-bot stdlib-bot added the Good First PR A pull request resolving a Good First Issue. label Apr 16, 2026
@GuneetGill
Copy link
Copy Markdown
Contributor Author

The gsyr test file test.ndarray.js still triggers an ESLint max-lines warning locally (~1032 lines vs 1000 limit). It’s unrelated to the no-empty-lines-between-requires fixes in this PR.

Question for reviewers: Should I address the max-lines warning in this PR (e.g. split the file or a scoped eslint disable), or leave it for a follow-up?

@kgryte kgryte added difficulty: 1 Low degree of difficulty. Should be straightforward to implement and/or resolve. review: 5 and removed Needs Review A pull request which needs code review. labels Apr 16, 2026
Copy link
Copy Markdown
Member

@kgryte kgryte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kgryte
Copy link
Copy Markdown
Member

kgryte commented Apr 16, 2026

@GuneetGill No need to address the max-lines warning.

@kgryte kgryte merged commit d4396d9 into stdlib-js:develop Apr 16, 2026
91 of 92 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

difficulty: 1 Low degree of difficulty. Should be straightforward to implement and/or resolve. Good First PR A pull request resolving a Good First Issue. review: 5

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix JavaScript lint errors

3 participants