What is Linting?
Automated static analysis of source code to find programming errors, bugs, stylistic issues, and suspicious patterns before the code runs. ESLint is the standard linter for JavaScript and TypeScript.
In plain English
Linting is like a spell-checker and grammar-checker for code. It doesn't just find typos — it also flags awkward sentence structures, consistency issues, and patterns that usually indicate mistakes. It catches errors while you're writing, not after you've published.
How it works
A linter analyzes your source code without executing it, checking it against a set of rules. Rules can catch real bugs (unused variables, unreachable code), enforce best practices (no console.log in production), and maintain code style consistency (consistent quote usage, semicolons). ESLint is highly configurable with shareable configs like eslint-config-next.
Why it matters for AI-built apps
AI-generated code often contains subtle issues that linters catch immediately: unused imports, variables declared but never used, inconsistent formatting, missing accessibility attributes, and React hook rule violations. Running a linter on AI-generated code is one of the fastest ways to improve its quality. It's like having a senior developer review every line automatically.
Common issues
Not setting up linting at all (no quality baseline), disabling rules instead of fixing violations, inconsistent configuration across the project, not running linting in CI/CD (so violations slip through), outdated lint configs missing modern best practices, and too many rules creating noise that drowns out real issues.
Best practices
Set up ESLint and Prettier from the start of every project. Use recommended configs as a baseline (eslint-config-next for Next.js). Run linting in CI/CD to prevent merging code with violations. Fix warnings rather than disabling them. Use editor integration (VS Code ESLint extension) for real-time feedback. Add custom rules specific to your codebase as patterns emerge.
Frequently asked questions
What's the difference between ESLint and Prettier?
ESLint analyzes code quality and catches bugs (unused variables, missing returns, accessibility issues). Prettier only handles code formatting (indentation, line length, quotes, semicolons). They complement each other: use ESLint for quality rules and Prettier for formatting. Configure them to not conflict using eslint-config-prettier.
Should I fix all linting errors in my AI-generated code?
Yes, prioritize errors (real bugs) over warnings (style issues). ESLint errors often indicate genuine problems — unused variables from incomplete refactoring, React hooks used incorrectly, or accessibility violations. Fixing these significantly improves your code quality. If a specific rule doesn't apply to your project, disable it in config rather than per-line.
Check your app
Get a professional review of your app at a fixed price.
Security Scan
Black-box review of your public-facing app. No code access needed.
- OWASP Top 10 checks
- SSL/TLS analysis
- Security headers
- Expert review within 24h
Code Audit
In-depth review of your source code for security, quality, and best practices.
- Security vulnerabilities
- Code quality review
- Dependency audit
- AI pattern analysis
Complete Bundle
Both scans in one package with cross-referenced findings.
- Everything in both products
- Cross-referenced findings
- Unified action plan
100% credited toward any paid service. Start with an audit, then let us fix what we find.
Worried about linting in your app?
Get a professional code audit ($19) or book a free call to discuss your concerns.