Skip to content

refactor: replace var with let and const for variable declarations across multiple files - #72

Open
pascalre wants to merge 1 commit into
SolaceLabs:mainfrom
pascalre:feat/resolve-linting-issues
Open

pascalre wants to merge 1 commit into
SolaceLabs:mainfrom
pascalre:feat/resolve-linting-issues

Conversation

@pascalre

@pascalre pascalre commented May 6, 2026

Copy link
Copy Markdown
Contributor
  • Updated variable declarations from var to let or const in feed-validate.ts, publish.ts, receive.ts, reply.ts, request.ts, semp-connection.ts, chalkUtils.ts, checkparams.ts, config.ts, defaults.ts, init.ts, listfeeds.ts, logger.ts, parse.ts, prettify.ts, shorthash.ts, visualize.ts.
  • This change improves code readability and maintains block scope for variables.

…ross multiple files

- Updated variable declarations from var to let or const in feed-validate.ts, publish.ts, receive.ts, reply.ts, request.ts, semp-connection.ts, chalkUtils.ts, checkparams.ts, config.ts, defaults.ts, init.ts, listfeeds.ts, logger.ts, parse.ts, prettify.ts, shorthash.ts, visualize.ts.
- This change improves code readability and maintains block scope for variables.

@gvensan gvensan left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for taking this up.

@gvensan

gvensan commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

The src/ changes look good to me - I verified the whole
diff is mechanical (386 pure keyword swaps plus the as const cleanups),
tsc is clean, and the build runs.

Two things before we merge:

  1. Could you revert the public/ directory? The autofix stripped upstream
    eslint-disable directives out of jquery.js, jquery.slim.js, adminlte.js
    and MQTTSolaceClient.js. Those are vendored third-party files and we want
    them byte-identical to upstream so future version bumps stay clean.

  2. The underlying cause is that eslint.config.mjs has no ignores block, so
    the linter walks into vendored assets. Could you add:

    { ignores: ['public/', 'dist/', 'bin/**'] }

    as the first entry in defineConfig()? That also drops the total error
    count from ~5,360 to ~1,427, which makes the remaining work much easier
    to see.

Minor: a few src/ files (config.ts, prettify.ts, shorthash.ts) have trailing
whitespace left where disable-comments were removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants