Skip to content

Add an ESLint config and run lint in CI #25

@mikewheeleer

Description

@mikewheeleer

Implement an ESLint config and enforce it in CI

Description

package.json defines "lint": "eslint src --ext .ts" and depends on eslint@^9, but there is no ESLint config file in the repo, so npm run lint cannot run with a working ruleset, and .github/workflows/ci.yml never invokes lint. This issue adds a flat-config ESLint setup with TypeScript support and gates CI on it.

Requirements and context

  • Repository scope: StableRoute-Org/Stableroute-backend only.
  • Create eslint.config.js (create file) using ESLint 9 flat config with typescript-eslint, targeting src/**/*.ts.
  • Add @typescript-eslint/parser and typescript-eslint (or @typescript-eslint/eslint-plugin) to devDependencies.
  • Enable a sensible ruleset (recommended + no-floating-promises once type-aware linting is configured) and fix or // eslint-disable justified violations.
  • Add a Lint step to .github/workflows/ci.yml running npm run lint.

Suggested execution

  • Fork the repo and create a branch
  • git checkout -b enhancement/tooling-25-eslint-config
  • Implement changes
    • Write code in: create eslint.config.js; update package.json and .github/workflows/ci.yml.
    • Write comprehensive tests in: n/a — CI lint step is the gate; ensure npm test still passes.
    • Add documentation: note the lint workflow in README.md.
    • Validate security: enable rules that catch unsafe any and floating promises.
  • Test and commit

Test and commit

  • Run npm run lint, npm run build, and npm test — all must pass clean.
  • Cover edge cases: lint fails on an intentionally bad sample, passes on src/.
  • Paste npm run lint output in the PR.

Example commit message

chore(tooling): add ESLint flat config and enforce lint in CI

Guidelines

  • Minimum 95 percent test coverage for impacted code.
  • Clear, reviewer-focused documentation.
  • Timeframe: 96 hours.

Community & contribution rewards

  • 💬 Join the StableRoute community on Discord for questions, reviews, and faster merges: https://discord.gg/37aCpusvx
  • ⭐ This is a GrantFox OSS / Official Campaign task and may be rewarded. When your PR is merged you'll be prompted to rate the project — if this issue and the maintainers helped you ship, we'd be grateful for a 5-star rating. Clear questions in Discord and tidy, well-tested PRs are the fastest path to a merge and a reward.

Metadata

Metadata

Assignees

No one assigned
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions