Skip to content

fix(lint): fix pre-existing ESLint errors across modules/ (curly, no-undef, etc.) #10

@CodeMonkeyCybersecurity

Description

ISoBAR

Identification: Pre-existing ESLint errors across 60+ files in modules/

Situation: Issue #1 (auth-issue-database runtime crashes) required adding a CI lint step. During that work, npm run lint:fix auto-fixed curly brace errors in 60+ files but those fixes were too broad and were reverted to keep the PR scoped. The CI lint in issue #1 was narrowed to only the 5 files directly modified.

Observations:

  • curly rule violations in ~40 files under modules/ (all auto-fixable)
  • no-useless-escape in several regex patterns
  • no-control-regex in jwt-validator.js (intentional null-byte check — needs eslint-disable)
  • no-empty catch blocks in oidc-validator.js, request-details.js
  • no-script-url in content-collector.js (intentional — analyzing script URLs)
  • no-inner-declarations in jwt-utils.js
  • no-undef: SiteReputationOverlay in content/analysis-runner.js (missing import)
  • no-case-declarations in header-utils.js
  • html/assets/index-DYO2mJ8d.js added to .eslintignore as part of Claude/hera adversarial analysis 011 cv3urve c4 db yr7h wyt9xn #1

Background: ESLint was running in flat config mode (auto-detecting eslint.config.js) which broke --ext .js. Fixed in #1 by adding ESLINT_USE_FLAT_CONFIG=false. The CI lint scope was narrowed to avoid pre-existing failures blocking the PR.

Assessment: 52 ESLint errors, 130+ warnings across modules/. All curly errors are auto-fixable. Non-fixable errors need manual attention. Running ESLINT_USE_FLAT_CONFIG=false npx eslint modules/ --ext .js --fix will fix the auto-fixable subset.

Recommendation:

  1. Run npm run lint:fix across full modules/ dir
  2. Manually fix remaining non-auto-fixable errors (see Observations above)
  3. Expand ci lint scope from 5 files back to modules/ once clean
  4. File as P2 — does not block functionality, CI was scoped to work around it

Priority: P2
Refs: PR for #1 (fix/1-auth-issue-database-runtime-crashes)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions