Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix JavaScript lint errors #6214

Open
stdlib-bot opened this issue Mar 20, 2025 · 4 comments · May be fixed by #6221
Open

Fix JavaScript lint errors #6214

stdlib-bot opened this issue Mar 20, 2025 · 4 comments · May be fixed by #6221
Labels
Good First Issue A good first issue for new contributors!

Comments

@stdlib-bot
Copy link
Contributor

JavaScript Linting Failures

Linting failures were detected in the automated JavaScript lint workflow run.

Workflow Details

Error Details

make[1]: Entering directory '/home/runner/work/stdlib/stdlib'

Linting file: lib/node_modules/@stdlib/stats/base/dists/levy/ctor/lib/index.js

Linting file: lib/node_modules/@stdlib/blas/ext/base/gasumpw/lib/ndarray.js

Linting file: lib/node_modules/@stdlib/ndarray/base/map/lib/3d_blocked.js

Linting file: lib/node_modules/@stdlib/math/base/special/asin/lib/rational_rs.js

Linting file: lib/node_modules/@stdlib/proxy/ctor/lib/polyfill.js

/home/runner/work/stdlib/stdlib/lib/node_modules/@stdlib/proxy/ctor/lib/polyfill.js
23:1  error    Displayed return value is `6.28`, but expected `3.14` instead  stdlib/jsdoc-doctest
48:2  warning  Unexpected 'todo' comment: 'TODO: polyfill implementation'     no-warning-comments

✖ 2 problems (1 error, 1 warning)
1 error and 0 warnings potentially fixable with the `--fix` option.

Linting failed.

Linting file: lib/node_modules/@stdlib/plot/ctor/lib/render/svg/init.js

Linting file: lib/node_modules/@stdlib/stats/base/dists/erlang/mgf/lib/main.js

Linting file: lib/node_modules/@stdlib/random/streams/gumbel/lib/object_mode.js

Linting file: lib/node_modules/@stdlib/blas/base/scasum/lib/native.js

Linting file: lib/node_modules/@stdlib/blas/ext/base/dnannsumkbn/lib/dnannsumkbn.native.js

Linting file: lib/node_modules/@stdlib/array/base/assert/is-data-type/lib/index.js

Linting file: lib/node_modules/@stdlib/strided/base/unary-by/lib/unary.js

Linting file: lib/node_modules/@stdlib/_tools/eslint/rules/jsdoc-definition-case/lib/index.js

Linting file: lib/node_modules/@stdlib/math/base/assert/is-negative-zero/lib/index.js

Linting file: lib/node_modules/@stdlib/datasets/sotu/lib/browser_get_file.js

Linting file: lib/node_modules/@stdlib/math/base/special/ceilf/lib/native.js

Linting file: lib/node_modules/@stdlib/plot/sparklines/unicode/lib/render.js

Linting file: lib/node_modules/@stdlib/stats/strided/dminabs/lib/ndarray.js

Linting file: lib/node_modules/@stdlib/ndarray/base/assign/lib/6d_accessors.js

Linting file: lib/node_modules/@stdlib/math/strided/special/sqrt-by/lib/ndarray.js

Linting file: lib/node_modules/@stdlib/assert/has-define-properties-support/lib/define_properties.js

Linting file: lib/node_modules/@stdlib/assert/is-electron-renderer/lib/index.js

Linting file: lib/node_modules/@stdlib/stats/base/dists/arcsine/median/lib/main.js
make[1]: *** [/home/runner/work/stdlib/stdlib/tools/make/lib/lint/javascript/eslint.mk:255: eslint-files] Error 1
make[1]: Leaving directory '/home/runner/work/stdlib/stdlib'
make: *** [/home/runner/work/stdlib/stdlib/tools/make/lib/lint/javascript/Makefile:158: lint-javascript-files] Error 2

Pull Request Instructions

  • Please use the following PR title format:
    "chore: fix JavaScript lint errors (issue #<ISSUE_NUMBER>)".
  • Reference this issue in the "Related Issues" section of the PR body as "resolves #<ISSUE_NUMBER>".
@stdlib-bot stdlib-bot added the Good First Issue A good first issue for new contributors! label Mar 20, 2025
@stdlib-bot
Copy link
Contributor Author

👋 Important: PLEASE READ 👋

This issue has been labeled as a good first issue and is available for anyone to work on.

If this is your first time contributing to an open source project, some aspects of the development process may seem unusual, arcane, or some combination of both.

  1. You cannot "claim" issues. People new to open source often want to "claim" or be assigned an issue before beginning work. The typical rationale is that people want to avoid wasted work in the event that someone else ends up working the issue. However, this practice is not effective in open source, as it often leads to "issue squatting", in which an individual asks to be assigned, is granted their request, and then never ends up working on the issue. Accordingly, you are encouraged to communicate your intent to address this issue, ideally by providing a rough outline as to how you plan to address the issue or asking clarifying questions, but, at the end of the day, we will take running code and rough consensus in order to move forward quickly.
  2. We have a very high bar for contributions. We have very high standards for contributions and expect all contributions—whether new features, tests, or documentation—to be rigorous, thorough, and complete. Once a pull request is merged into stdlib, that contribution immediately becomes the collective responsibility of all maintainers of stdlib. When we merge code into stdlib, we are saying that we, the maintainers, commit to reviewing subsequent changes and making bugfixes to the code. Hence, in order to ensure future maintainability, this naturally leads to a higher standard of contribution.

Before working on this issue and opening a pull request, please read the project's contributing guidelines. These guidelines and the associated development guide provide important information, including links to stdlib's Code of Conduct, license policy, and steps for setting up your local development environment.

To reiterate, we strongly encourage you to refer to our contributing guides before beginning work on this issue. Failure to follow our guidelines significantly decreases the likelihood that you'll successfully contribute to stdlib and may result in automatic closure of a pull request without review.

Setting up your local development environment is a critical first step, as doing so ensures that automated development processes for linting, license verification, and unit testing can run prior to authoring commits and pushing changes. If you would prefer to avoid manual setup, we provide pre-configured development containers for use locally or in GitHub Codespaces.

We place a high value on consistency throughout the stdlib codebase. We encourage you to closely examine other packages in stdlib and attempt to emulate the practices and conventions found therein.

  • If you are attempting to contribute a new package, sometimes the best approach is to simply copy the contents of an existing package and then modify the minimum amount necessary to implement the feature (e.g., changing descriptions, parameter names, and implementation).
  • If you are contributing tests, find a package implementing a similar feature and emulate the tests of that package.
  • If you are updating documentation, examine several similar packages and emulate the content, style, and prose of those packages.

In short, the more effort you put in to ensure that your contribution looks and feels like stdlib—including variables names, bracket spacing, line breaks, etc—the more likely that your contribution will be reviewed and ultimately accepted. We encourage you to closely study the codebase before beginning work on this issue.

✨ Thank you again for your interest in stdlib, and we look forward to reviewing your future contributions. ✨

@AlyAbdelmoneim
Copy link
Contributor

I think the issue exists because the Proxy function is unimplemented—it just returns target. The JSDoc test fails since p.a returns 3.14, not 6.28. Once the polyfill is implemented, this issue will likely be invalid.

bhavishy2801 added a commit to bhavishy2801/stdlib that referenced this issue Mar 20, 2025
Signed-off-by: Bhavishy Agrawal <90029607+bhavishy2801@users.noreply.github.com>
bhavishy2801 added a commit to bhavishy2801/stdlib that referenced this issue Mar 20, 2025
Signed-off-by: Bhavishy Agrawal <90029607+bhavishy2801@users.noreply.github.com>
@bhavishy2801 bhavishy2801 linked a pull request Mar 20, 2025 that will close this issue
1 task
@bhavishy2801
Copy link
Contributor

@kgryte please review

@Dakshjain1604
Copy link

Dakshjain1604 commented Mar 23, 2025

**to remove
48:2 warning Unexpected 'todo' comment: 'TODO: polyfill implementation' no-warning-comments
**
in the lib/node_modules/@stdlib/proxy/ctor/lib/polyfill.js

we can either write

// eslint-disable-next-line no-warning-comments

just above the TODO:polyfill implementation

or

we can simply write this on the top of the file to disable ESLint warnings for the whole polyfill.js file

/* eslint-disable no-warning-comments */

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Good First Issue A good first issue for new contributors!
Projects
None yet
4 participants