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
Documentation

eslint-plugin-ai-guardrails

ESLint guardrails for AI-assisted codebases. Stop AI-generated code from becoming long-term tech debt.


Quick Start

The fastest way to get started is with the CLI initializer:

npx eslint-plugin-ai-guardrails init

This creates or updates your ESLint config, tsconfig, and package.json scripts automatically.


Guides

โš™๏ธ

Configuration

All configuration options, ESLint v8/v9 setup, and team presets.

๐Ÿ”Œ

Integrations

Framework-specific setup guides for Vite, Next.js, NestJS, Express, and more.

๐Ÿ”ง

Troubleshooting

Common issues and solutions for parser errors, config problems, and CI setup.

๐Ÿค

Contributing

How to contribute: local setup, architecture overview, rule authoring checklist.

๐Ÿ“‹

Changelog

Release history and notable changes for every version.

๐Ÿท๏ธ

Versioning & Release

Semantic versioning policy, release checklist, and pre-publish verification.


Rules

4 rules that target the specific patterns AI coding assistants produce.

max-file-lines

warn

Prevent files from exceeding 300 lines

โ†’

max-function-lines

warn

Prevent functions/methods from exceeding 50 lines

โ†’

no-orphan-todos

error

Require TODO/FIXME/HACK to include a tracking reference

โ†’

no-ai-obvious-comments

warn

Detect comments that just repeat the following code

โ†’

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