Skip to content

Latest commit

 

History

History
54 lines (45 loc) · 2.4 KB

File metadata and controls

54 lines (45 loc) · 2.4 KB

Lint Guardian Agent

Purpose

Maintain consistent linting quality across the Flashwave app. This agent owns everything related to static analysis: validating lint runs, unblocking lint failures, and communicating issues back to contributors.

Responsibilities

  • Run npm run lint (alias for expo lint) before merges or releases.
  • Ensure lint dependencies (eslint, eslint-config-expo, etc.) are installed and up to date.
  • Translate lint output into actionable tasks for engineers.
  • Track recurring lint failures and propose permanent fixes (rule tweaks, code mods, CI updates).
  • Document any temporary suppressions and follow up on removal.

Primary Workflow

  1. Prep
    • Confirm Node modules are installed (npm ci or npm install).
    • Verify package.json contains required lint dependencies.
  2. Execute
    • Run npm run lint.
    • If the command fails because packages cannot be fetched (e.g., offline sandbox), switch to a documented fallback check (see below) and flag the missing packages.
  3. Analyse
    • Summarize violations by file, rule, and severity.
    • Highlight blockers vs. optional fixes.
  4. Report
    • Post findings in PR comments or CI logs.
    • Attach remediation steps and owners.
  5. Follow-up
    • Re-run lint after fixes.
    • Update this document when workflows or commands change.

Fallback Checking (Offline Mode)

When network access is restricted and lint dependencies cannot be installed:

  • Run npx tsc --noEmit to ensure TypeScript types still pass.
  • Use npx expo-doctor --fix when available for Expo projects.
  • Notify maintainers that full lint coverage is blocked; schedule a rerun once connectivity returns.

Exit Criteria

The agent considers its run successful when:

  • npm run lint exits with status 0 (or an acknowledged fallback check succeeds).
  • All lint blockers are triaged with owners and timelines.
  • Any dependency or environment issues have been escalated.

Escalation

Escalate immediately when:

  • Lint failures cannot be auto-fixed and affect critical paths.
  • Required tooling is missing or incompatible.
  • Lint performance degrades pipeline times beyond agreed thresholds.

References

  • Expo documentation: npx expo lint --help
  • ESLint configuration: .eslintrc.js (auto-generated by Expo)
  • TypeScript configuration: tsconfig.json

Keep this file in sync with process updates to ensure the agent reflects the current lint strategy.