Skip to content

Fix ESLint errors across all JavaScript files#24

Merged
gb119 merged 3 commits into
mainfrom
copilot/fix-eslint-errors
Mar 3, 2026
Merged

Fix ESLint errors across all JavaScript files#24
gb119 merged 3 commits into
mainfrom
copilot/fix-eslint-errors

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 3, 2026

The three browser JS files in the project contained ESLint violations: implicit globals, missing semicolons, loose equality (==), unused variables, and debug console.log calls. This adds ESLint tooling and resolves all warnings.

Tooling

  • eslint.config.mjs – Flat config with sourceType: "script" (required for /* exported */ directive support), browser globals ($, htmx, bootstrap, DOM APIs), and rules: no-unused-vars, no-undef, semi, eqeqeq, no-console
  • package.json – Added lint:js script and eslint dev dependency

htmx_dialog.js

  • Removed dead code: defaultWidgetOptions object and getConfig function (never called)
  • ===== throughout; added missing semicolons; normalised indentation

obfuscatre_htmlfield.js

  • Removed unused event parameter from the submit handler
  • Removed debug console.log calls
  • Fixed Python-style "True""true" in JS attribute value

autocomplete.js

  • Added /* exported */ comment for all functions used via inline HTML event handlers (e.g. onkeydown, onfocus) — these are globally accessible but invisible to the linter
  • Promoted implicit globals to explicit var declarations:
    // Before (implicit global, flagged by no-undef)
    phac_aspc_autocomplete_blur_skip = {};
    // After
    var phac_aspc_autocomplete_blur_skip = {};
  • Fixed !=/==!==/===; added missing semicolons on arrow-function assignments

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits March 3, 2026 15:28
Co-authored-by: gb119 <4428426+gb119@users.noreply.github.com>
Co-authored-by: gb119 <4428426+gb119@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix ESLint errors in JavaScript code Fix ESLint errors across all JavaScript files Mar 3, 2026
Copilot finished work on behalf of gb119 March 3, 2026 15:34
@codacy-production
Copy link
Copy Markdown

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.00% (target: -1.00%)
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (a6d72e4) 4847 3053 62.99%
Head commit (9c3710c) 4847 (+0) 3053 (+0) 62.99% (+0.00%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#24) 0 0 ∅ (not applicable)

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

@gb119 gb119 marked this pull request as ready for review March 3, 2026 15:37
@gb119 gb119 merged commit 17949f4 into main Mar 3, 2026
3 of 4 checks passed
@gb119 gb119 deleted the copilot/fix-eslint-errors branch March 3, 2026 15:37
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