stdlib icon indicating copy to clipboard operation
stdlib copied to clipboard

Fix JavaScript lint errors

Open stdlib-bot opened this issue 1 month ago • 4 comments

JavaScript Linting Failures

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

Workflow Details

  • Run: https://github.com/stdlib-js/stdlib/actions/runs/19216455341
  • Type: JavaScript Linting
  • Date: 2025-11-10 00:13:47 UTC

Error Details

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

Linting file: lib/node_modules/@stdlib/math/iter/special/ramp/examples/index.js

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

Linting file: lib/node_modules/@stdlib/math/base/special/tanh/examples/index.js
tanh(3.4753) = 0.9981
tanh(0.4423) = 0.4156
tanh(-0.4729) = -0.4406
tanh(-3.3422) = -0.9975
tanh(3.2626) = 0.9971
tanh(1.3762) = 0.8801
tanh(1.9032) = 0.9565
tanh(-1.4822) = -0.9019
tanh(-0.3999) = -0.3799
tanh(-1.2882) = -0.8587
tanh(2.6028) = 0.9891
tanh(-1.6942) = -0.9347
tanh(-1.9634) = -0.9613
tanh(-2.9077) = -0.9941
tanh(3.0637) = 0.9956
tanh(2.9742) = 0.9948
tanh(2.8001) = 0.9926
tanh(-0.4043) = -0.3836
tanh(-3.1134) = -0.9961
tanh(0.6276) = 0.5564
tanh(-3.9896) = -0.9993
tanh(-3.1995) = -0.9967
tanh(-1.9949) = -0.9637
tanh(-1.0937) = -0.7982
tanh(-2.9493) = -0.9945
tanh(2.7286) = 0.9915
tanh(-3.2806) = -0.9972
tanh(-3.5808) = -0.9984
tanh(1.3973) = 0.8848
tanh(-1.1245) = -0.8091
tanh(-2.1027) = -0.9706
tanh(-2.3337) = -0.9814
tanh(-2.1451) = -0.9730
tanh(-1.9204) = -0.9580
tanh(3.7902) = 0.9990
tanh(1.3905) = 0.8833
tanh(1.8066) = 0.9475
tanh(-3.2845) = -0.9972
tanh(0.9623) = 0.7453
tanh(-3.2109) = -0.9968
tanh(-2.7744) = -0.9922
tanh(-2.6403) = -0.9899
tanh(3.7087) = 0.9988
tanh(2.3521) = 0.9820
tanh(3.9462) = 0.9993
tanh(1.4768) = 0.9009
tanh(2.0906) = 0.9699
tanh(2.0466) = 0.9672
tanh(-1.5329) = -0.9109
tanh(-1.6046) = -0.9224
tanh(3.9012) = 0.9992
tanh(-1.3738) = -0.8795
tanh(-0.1863) = -0.1842
tanh(0.5246) = 0.4813
tanh(-0.1166) = -0.1160
tanh(-3.9922) = -0.9993
tanh(-3.9958) = -0.9993
tanh(-3.3375) = -0.9975
tanh(3.6039) = 0.9985
tanh(-1.4161) = -0.8888
tanh(0.8841) = 0.7084
tanh(-3.7748) = -0.9989
tanh(0.6286) = 0.5571
tanh(0.5237) = 0.4805
tanh(3.5584) = 0.9984
tanh(-2.7394) = -0.9917
tanh(1.9425) = 0.9597
tanh(-3.1734) = -0.9965
tanh(2.0927) = 0.9700
tanh(-3.8425) = -0.9991
tanh(2.1038) = 0.9707
tanh(1.7204) = 0.9379
tanh(2.5468) = 0.9878
tanh(-1.3576) = -0.8758
tanh(3.9725) = 0.9993
tanh(-1.4376) = -0.8932
tanh(2.9058) = 0.9940
tanh(-1.6893) = -0.9341
tanh(-3.2508) = -0.9970
tanh(1.5112) = 0.9072
tanh(1.5810) = 0.9188
tanh(0.0766) = 0.0764
tanh(-3.8424) = -0.9991
tanh(1.4372) = 0.8931
tanh(0.6413) = 0.5658
tanh(3.3495) = 0.9975
tanh(-2.4564) = -0.9854
tanh(-1.6396) = -0.9274
tanh(1.5496) = 0.9137
tanh(1.6900) = 0.9341
tanh(3.5764) = 0.9984
tanh(1.5542) = 0.9145
tanh(0.6293) = 0.5576
tanh(-3.2999) = -0.9973
tanh(-1.6867) = -0.9337
tanh(3.4972) = 0.9982
tanh(2.7606) = 0.9920
tanh(-2.3202) = -0.9809
tanh(-2.7669) = -0.9921
tanh(0.1293) = 0.1286

Linting file: lib/node_modules/@stdlib/stats/base/dists/laplace/mode/examples/index.js
µ: 2.1025, b: 12.3844, mode(X;µ,b): 2.1025
µ: -3.7721, b: 10.6368, mode(X;µ,b): -3.7721
µ: 3.8555, b: 7.8670, mode(X;µ,b): 3.8555
µ: -2.8469, b: 17.7064, mode(X;µ,b): -2.8469
µ: 0.1643, b: 2.4214, mode(X;µ,b): 0.1643
µ: 3.0707, b: 13.5565, mode(X;µ,b): 3.0707
µ: -1.7260, b: 2.7874, mode(X;µ,b): -1.7260
µ: -0.0721, b: 6.5137, mode(X;µ,b): -0.0721
µ: -0.3381, b: 6.6171, mode(X;µ,b): -0.3381
µ: -3.5799, b: 7.8896, mode(X;µ,b): -3.5799

Linting file: lib/node_modules/@stdlib/blas/ext/base/gcusumors/examples/index.js

Linting file: lib/node_modules/@stdlib/random/strided/poisson/examples/index.js
x1[0] = 1.00; x2[0] = 1.00
x1[1] = 3.00; x2[1] = 3.00
x1[2] = 4.00; x2[2] = 4.00
x1[3] = 3.00; x2[3] = 3.00
x1[4] = 2.00; x2[4] = 2.00
x1[5] = 4.00; x2[5] = 4.00
x1[6] = 3.00; x2[6] = 3.00
x1[7] = 3.00; x2[7] = 3.00
x1[8] = 2.00; x2[8] = 2.00
x1[9] = 2.00; x2[9] = 2.00

Linting file: lib/node_modules/@stdlib/string/base/truncate-middle/examples/index.js

Linting file: lib/node_modules/@stdlib/math/base/special/betaln/examples/index.js

Linting file: lib/node_modules/@stdlib/stats/base/dists/normal/median/examples/index.js

Linting file: lib/node_modules/@stdlib/constants/float32/max-safe-fibonacci/examples/index.js

Linting file: lib/node_modules/@stdlib/stats/strided/svariancech/examples/index.js

Linting file: lib/node_modules/@stdlib/assert/is-node/examples/index.js

Linting file: lib/node_modules/@stdlib/fs/read-dir/examples/index.js

/home/runner/work/stdlib/stdlib/lib/node_modules/@stdlib/fs/read-dir/examples/index.js
33:1  error  Displayed return value is `true`, but expected `false` instead  stdlib/doctest

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

Linting failed.

Linting file: lib/node_modules/@stdlib/assert/is-plain-object/examples/index.js

Linting file: lib/node_modules/@stdlib/stats/base/dists/geometric/ctor/examples/index.js
make[1]: *** [/home/runner/work/stdlib/stdlib/tools/make/lib/lint/javascript/eslint.mk:261: 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 avatar Nov 10 '25 00:11 stdlib-bot

:wave: Important: PLEASE READ :wave:

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.

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

stdlib-bot avatar Nov 10 '25 00:11 stdlib-bot

/assign

adity1raut avatar Nov 10 '25 06:11 adity1raut

i also tried to make change in the readme as you suggested but this lint error occurs & thats why unable to solve it

Linting files for basic formatting errors... Success. No detected EditorConfig lint errors. Linting file: lib/node_modules/@stdlib/fs/read-dir/README.md (node:5273) [DEP0176] DeprecationWarning: fs.F_OK is deprecated, use fs.constants.F_OK instead (Use node --trace-deprecation ... to show where the warning was created) lib/node_modules/@stdlib/fs/read-dir/README.md 73:5-82:8 error 10:11 error Use @stdlib/fs/read-dir instead of fs.readdirSync. no-restricted-syntax eslint remark-lint 73:5-82:8 error 10:11 warning Unexpected sync method: 'readdirSync'. node/no-sync eslint remark-lint 73:5-82:8 error 9:6 error Use @stdlib/fs/exists instead of fs.existsSync. no-restricted-syntax eslint remark-lint 73:5-82:8 error 9:6 warning Unexpected sync method: 'existsSync'. node/no-sync eslint remark-lint ✖ 4 errors make: *** [lint-markdown-files] Error 1 Markdown lint errors.

thank you

sujalc879 avatar Nov 12 '25 15:11 sujalc879

I would like to work on this issue. Please assign it to me

jatinkumarsingh avatar Nov 26 '25 01:11 jatinkumarsingh