Skip to content

Lint coverage for src/scripts/*.js #557

Description

@Davidnet

Summary

ESLint does not cover the Node helper scripts under src/scripts/. The lint script runs eslint . from src/frontend (package.json"lint": "cd src/frontend && npm run lint"), and the flat config's base path is src/frontend, so any file outside it is reported as "File ignored because outside of base path".

As a result, scripts like src/scripts/electron-dev.js, remove-locales.js, notarize.js, and sync-manifest-version.js are never linted in CI. They currently have to be checked by hand, e.g.:

node_modules/.bin/eslint --config src/frontend/eslint.config.js --no-config-lookup src/scripts/electron-dev.js

Proposal

Bring src/scripts/*.js into the lint path with a Node-oriented config block, and make npm run lint cover them automatically so they're checked in CI. Options to consider:

  • A root-level flat config that includes both src/frontend and src/scripts, or
  • A dedicated config block for src/scripts/**/*.js with Node globals and CommonJS sourceType.

These scripts are CommonJS Node (require/module.exports), so they need Node globals and sourceType: "commonjs" rather than the browser/React rules used for the frontend.

Acceptance criteria

  • npm run lint lints src/scripts/*.js without manual --no-config-lookup invocations.
  • Existing scripts pass (or get fixed) under the chosen ruleset.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions