Skip to content

Integrate eslint-plugin-sonarjs and fix linting findings #690

Description

@JoshuaVSherman

Integrate eslint-plugin-sonarjs to improve the quality of the React/TypeScript codebase.

Specific Technical Debt to Address:

  • Type Safety: In src/containers/Staff/StaffContent.tsx, replace the any type in the staffItems.staff.map function with a proper TypeScript interface based on staffItems.json.
  • Logic Consolidation: In src/containers/Youth/YouthContent.tsx, consolidate the two separate useContext(ContentContext) calls into a single destructuring statement.
  • Maintainability: Review src/containers/Family/FamilyContent.tsx and src/containers/Stewardship/StewardshipContent.tsx for high cognitive complexity caused by large JSX blocks or raw HTML strings.

Tasks:

  1. Install: npm install --save-dev eslint-plugin-sonarjs
  2. Enable recommended rules in eslint.config.js.
  3. Run npx eslint . and fix findings.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    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