Skip to content

Add ESLint rules for consistent component patterns #172

Description

@Akatenvictor

What

Configure additional ESLint rules that enforce consistent patterns: prop-types ordering, hook dependency arrays, and import organization.

Why

Inconsistent code patterns increase cognitive load during reviews and make the codebase harder to navigate. Linting automates style enforcement.

Scope

In: Import ordering rules, hook dependency checks, prop ordering, consistent return types
Out: Custom ESLint rules, formatting rules (handled by Prettier)

Acceptance Criteria

  • Import sorting enforced (next, react, third-party, local)
  • exhaustive-deps rule enabled for useEffect
  • react/hook-use-state rule for consistent useState returns
  • No new lint errors after configuration
  • Lint passes in CI pipeline
  • Autofix available for most rules

Technical Context

  • Update .eslintrc.json with additional rules
  • Add eslint-plugin-import for import ordering
  • Run eslint --fix for existing code

Activity

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

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions