Skip to content

Fix JavaScript lint errors #8265

@stdlib-bot

Description

@stdlib-bot

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/namespace/lib/namespace/l.js

Linting file: lib/node_modules/@stdlib/blas/base/snrm2/lib/index.js

Linting file: lib/node_modules/@stdlib/random/array/tools/nullary/lib/index.js

Linting file: lib/node_modules/@stdlib/math/base/special/kernel-betaincinv/lib/polyval_co12.js

Linting file: lib/node_modules/@stdlib/stats/base/dists/bernoulli/skewness/lib/native.js

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

Linting file: lib/node_modules/@stdlib/plot/components/svg/axis/lib/components/ticks.js

/home/runner/work/stdlib/stdlib/lib/node_modules/@stdlib/plot/components/svg/axis/lib/components/ticks.js
56:8  error  Using the `new Array()` constructor is not allowed; use an array literal with push instead  stdlib/no-new-array

✖ 1 problem (1 error, 0 warnings)

Linting failed.

Linting file: lib/node_modules/@stdlib/utils/property-descriptors-in/lib/index.js

Linting file: lib/node_modules/@stdlib/math/strided/special/dmskramp/lib/ndarray.js

Linting file: lib/node_modules/@stdlib/_tools/eslint/rules/jsdoc-ordered-list-marker-value/lib/main.js

/home/runner/work/stdlib/stdlib/lib/node_modules/@stdlib/_tools/eslint/rules/jsdoc-ordered-list-marker-value/lib/main.js
125:2  error  Function 'copyLocationInfo' should be moved to module scope  stdlib/no-unnecessary-nested-functions

✖ 1 problem (1 error, 0 warnings)

Linting failed.

Linting file: lib/node_modules/@stdlib/stats/base/dists/arcsine/quantile/lib/index.js

Linting file: lib/node_modules/@stdlib/_tools/pkgs/installed/lib/validate.js

Linting file: lib/node_modules/@stdlib/plot/sparklines/unicode/lib/props/type/get.js

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

Linting file: lib/node_modules/@stdlib/_tools/pkgs/tree/lib/index.js

Linting file: lib/node_modules/@stdlib/blas/ext/base/grev/lib/accessors.js

Linting file: lib/node_modules/@stdlib/ndarray/base/count-truthy/lib/8d_blocked.js

Linting file: lib/node_modules/@stdlib/utils/any-by/lib/index.js

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

Linting file: lib/node_modules/@stdlib/bench/harness/lib/index.js
TAP version 13
# beep
---
iterations: 1000000
elapsed: 0.368164839
rate: 2716174.6426306614
...
# beep
---
iterations: 1000000
elapsed: 0.371236505
rate: 2693700.6100733546
...
# beep
---
iterations: 1000000
elapsed: 0.368379387
rate: 2714592.714168342
...
#
1..0
# total 0
# pass  0
#
# ok

Linting file: lib/node_modules/@stdlib/fs/exists/lib/async.js

Linting file: lib/node_modules/@stdlib/math/base/special/fresnel/lib/rational_pcqc.js

Linting file: lib/node_modules/@stdlib/repl/presentation/lib/format.js

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

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

Linting file: lib/node_modules/@stdlib/number/float64/base/add/lib/index.js

Linting file: lib/node_modules/@stdlib/utils/bifurcate-in/lib/return_values.js

Linting file: lib/node_modules/@stdlib/ndarray/base/unary-by/lib/3d_blocked.js

Linting file: lib/node_modules/@stdlib/math/base/special/erfcinv/scripts/evalrational.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
make[1]: Entering directory '/home/runner/work/stdlib/stdlib'

Linting file: lib/node_modules/@stdlib/utils/map3d/examples/index.js

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

/home/runner/work/stdlib/stdlib/lib/node_modules/@stdlib/blas/base/zscal/examples/index.js
24:13  error  Last `require` statement in example files must be a relative path  stdlib/require-last-path-relative

✖ 1 problem (1 error, 0 warnings)

Linting failed.

Linting file: lib/node_modules/@stdlib/_tools/docs/www/test-bundles/examples/index.js

Oops! Something went wrong! :(

ESLint: 8.57.1

[SyntaxError: 'import' and 'export' may appear only with 'sourceType: module'] {
message: "'import' and 'export' may appear only with 'sourceType: module'",
line: 1,
column: 1,
annotated: '\n' +
  '/home/runner/work/stdlib/stdlib/node_modules/yaml/browser/dist/index.js:1\n' +
  "import { d as defaultTagPrefix, _ as _createForOfIteratorHelper, a as _typeof, b as _createClass, c as _classCallCheck, e as _defineProperty, Y as YAMLSyntaxError, T as Type, f as YAMLWarning, g as YAMLSemanticError, h as _slicedToArray, i as YAMLError, j as _inherits, k as _createSuper } from './PlainValue-b8036b75.js';\n" +
  '^\n' +
  "ParseError: 'import' and 'export' may appear only with 'sourceType: module'",
stream: Labeled {
  _readableState: ReadableState {
    objectMode: true,
    highWaterMark: 16,
    buffer: BufferList { length: 0 },
    length: 0,
    pipes: Labeled {
      _readableState: ReadableState {
        objectMode: true,
        highWaterMark: 16,
        buffer: BufferList { length: 0 },
        length: 0,
        pipes: [Labeled],
        pipesCount: 1,
        flowing: true,
        ended: false,
        endEmitted: false,
        reading: true,
        sync: false,
        needReadable: true,
        emittedReadable: false,
        readableListening: false,
        resumeScheduled: false,
        destroyed: false,
        defaultEncoding: 'utf8',
        awaitDrain: 0,
        readingMore: false,
        decoder: null,
        encoding: null
      },
      readable: true,
      _events: [Object: null prototype] {
        end: [Array],
        finish: [Array],
        error: [Array],
        unpipe: [Function],
        drain: [Function],
        close: [Function],
        data: [Function],
        _mutate: [Function]
      },
      _eventsCount: 8,
      _maxListeners: undefined,
      _writableState: WritableState {
        objectMode: true,
        highWaterMark: 16,
        finalCalled: false,
        needDrain: false,
        ending: false,
        ended: false,
        finished: false,
        destroyed: false,
        decodeStrings: true,
        defaultEncoding: 'utf8',
        length: 0,
        writing: false,
        corked: 0,
        sync: false,
        bufferProcessing: false,
        onwrite: [Function],
        writecb: null,
        writelen: 0,
        bufferedRequest: null,
        lastBufferedRequest: null,
        pendingcb: 0,
        prefinished: false,
        errorEmitted: false,
        bufferedRequestCount: 0,
        corkedRequestsFree: [CorkedRequest],
        [buffer]: [Getter]
      },
      writable: true,
      allowHalfOpen: true,
      _options: { objectMode: true },
      _wrapOptions: { objectMode: true },
      _streams: [ [DestroyableTransform], [length]: 1 ],
      length: 1,
      label: 'sort',
      [Symbol(shapeMode)]: true,
      [Symbol(kCapture)]: false,
      _writev: null,
      [writableHighWaterMark]: [Getter],
      [destroyed]: [Getter/Setter]
    },
    pipesCount: 1,
    flowing: true,
    ended: false,
    endEmitted: false,
    reading: true,
    sync: false,
    needReadable: true,
    emittedReadable: false,
    readableListening: false,
    resumeScheduled: false,
    destroyed: false,
    defaultEncoding: 'utf8',
    awaitDrain: 0,
    readingMore: false,
    decoder: null,
    encoding: null
  },
  readable: true,
  _events: [Object: null prototype] {
    end: [
      [Function: bound onceWrapper] {
        [length]: 0,
        [name]: 'bound onceWrapper',
        listener: [Function]
      },
      [Function: bound onceWrapper] {
        [length]: 0,
        [name]: 'bound onceWrapper',
        listener: [Function]
      },
      [Function: bound onceWrapper] {
        [length]: 0,
        [name]: 'bound onceWrapper',
        listener: [Function]
      },
      [length]: 3
    ],
    finish: [Function: bound onceWrapper] {
      [length]: 0,
      [name]: 'bound onceWrapper',
      listener: [Function (anonymous)] {
        [length]: 0,
        [name]: '',
        [arguments]: null,
        [caller]: null,
        [prototype]: [Object]
      }
    },
    error: <ref *1> [Function (anonymous)] {
      [length]: 1,
      [name]: '',
      [arguments]: null,
      [caller]: null,
      [prototype]: { [constructor]: [Circular *1] }
    },
    unpipe: undefined,
    drain: undefined,
    close: undefined,
    data: <ref *2> [Function: ondata] {
      [length]: 1,
      [name]: 'ondata',
      [prototype]: { [constructor]: [Circular *2] }
    },
    _mutate: [Function: bound onceWrapper] {
      [length]: 0,
      [name]: 'bound onceWrapper',
      listener: [Function: onreadable] {
        [length]: 0,
        [name]: 'onreadable',
        [arguments]: null,
        [caller]: null,
        [prototype]: [Object]
      }
    }
  },
  _eventsCount: 5,
  _maxListeners: undefined,
  _writableState: WritableState {
    objectMode: true,
    highWaterMark: 16,
    finalCalled: false,
    needDrain: false,
    ending: false,
    ended: false,
    finished: false,
    destroyed: false,
    decodeStrings: true,
    defaultEncoding: 'utf8',
    length: 1,
    writing: true,
    corked: 0,
    sync: true,
    bufferProcessing: false,
    onwrite: <ref *3> [Function (anonymous)] {
      [length]: 1,
      [name]: '',
      [prototype]: { [constructor]: [Circular *3] }
    },
    writecb: <ref *4> [Function: nop] {
      [length]: 0,
      [name]: 'nop',
      [prototype]: { [constructor]: [Circular *4] }
    },
    writelen: 1,
    bufferedRequest: null,
    lastBufferedRequest: null,
    pendingcb: 1,
    prefinished: false,
    errorEmitted: false,
    bufferedRequestCount: 0,
    corkedRequestsFree: CorkedRequest {
      next: null,
      entry: null,
      finish: [Function (anonymous)] {
        [length]: 0,
        [name]: '',
        [prototype]: [Object]
      }
    },
    [buffer]: [Getter]
  },
  writable: true,
  allowHalfOpen: true,
  _options: { objectMode: true },
  _wrapOptions: { objectMode: true },
  _streams: [
    DestroyableTransform {
      _readableState: ReadableState {
        objectMode: true,
        highWaterMark: 16,
        buffer: BufferList { length: 0 },
        length: 0,
        pipes: null,
        pipesCount: 0,
        flowing: null,
        ended: false,
        endEmitted: false,
        reading: true,
        sync: false,
        needReadable: true,
        emittedReadable: false,
        readableListening: true,
        resumeScheduled: false,
        destroyed: false,
        defaultEncoding: 'utf8',
        awaitDrain: 0,
        readingMore: false,
        decoder: null,
        encoding: null
      },
      readable: true,
      _events: [Object: null prototype] {
        end: [Array],
        prefinish: [Function],
        error: [Function],
        readable: [Function]
      },
      _eventsCount: 4,
      _maxListeners: undefined,
      _writableState: WritableState {
        objectMode: true,
        highWaterMark: 16,
        finalCalled: false,
        needDrain: false,
        ending: false,
        ended: false,
        finished: false,
        destroyed: false,
        decodeStrings: true,
        defaultEncoding: 'utf8',
        length: 0,
        writing: false,
        corked: 0,
        sync: true,
        bufferProcessing: false,
        onwrite: [Function],
        writecb: null,
        writelen: 0,
        bufferedRequest: null,
        lastBufferedRequest: null,
        pendingcb: 0,
        prefinished: false,
        errorEmitted: false,
        bufferedRequestCount: 0,
        corkedRequestsFree: [CorkedRequest],
        [buffer]: [Getter]
      },
      writable: true,
      allowHalfOpen: true,
      _transformState: {
        afterTransform: [Function],
        needTransform: true,
        transforming: true,
        writecb: [Function],
        writechunk: [Object],
        writeencoding: 'utf8'
      },
      _destroyed: false,
      _transform: [Function (anonymous)] {
        [length]: 3,
        [name]: '',
        [arguments]: null,
        [caller]: null,
        [prototype]: [Object]
      },
      [Symbol(shapeMode)]: true,
      [Symbol(kCapture)]: false,
      _writev: null,
      [writableHighWaterMark]: [Getter],
      [destroyed]: [Getter/Setter]
    },
    [length]: 1
  ],
  length: 1,
  label: 'syntax',
  [Symbol(shapeMode)]: true,
  [Symbol(kCapture)]: false,
  _writev: null,
  [writableHighWaterMark]: [Getter],
  [destroyed]: [Getter/Setter]
}
}
Linting failed.
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>".

Metadata

Metadata

Assignees

No one assigned

    Labels

    Good First IssueA good first issue for new contributors!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions