AI Guardrails
DocsRulesIntegrations
GitHubnpm โ†’
Getting Started
    Overview
    Configuration
    Integrations

Rules
    max-file-lines
    warn
    max-function-lines
    warn
    no-orphan-todos
    error
    no-ai-obvious-comments
    warn

Resources
    Troubleshooting
    Contributing
    Changelog
    Versioning & Release
Reference

Rules

4 rules that target the specific patterns AI coding assistants produce. Each rule is fully configurable with custom thresholds and severity levels.


๐Ÿ“„

max-file-lines

warn
suggestion

Prevents "god files" by capping the effective line count of a file.

Default: 300 lines

๐Ÿ”ง

max-function-lines

warn
suggestion

Limits the number of effective lines inside function and method bodies to prevent "god functions."

Default: 50 lines

๐Ÿ“

no-orphan-todos

error
problem

Requires TODO, FIXME, and HACK comments to include a tracking reference and/or a deadline.

Default: reference required

๐Ÿ’ฌ

no-ai-obvious-comments

warn
suggestion

Detects comments that simply restate the following line of code.

Default: enabled
AI Guardrails

ESLint guardrails for AI-assisted codebases. Keep code clean, not chaotic.

Support development:
โ˜• Ko-fi๐Ÿ’– Trakteer
Resources
DocumentationConfigurationIntegrationsTroubleshootingChangelog
Rules
max-file-linesmax-function-linesno-orphan-todosno-ai-obvious-comments
Links
GitHubnpmIssuesContributing
Creator

Hanif Maulana (Isaac Newton)

GitHubX / TwitterLinkedIn

MIT License ยท eslint-plugin-ai-guardrails v1.0.0Built with care for maintainable AI-assisted development