Key Takeaways for Faster Code Reviews
- AI coding tools have increased PR review time by 91% because they generate more code and style issues that ESLint and Prettier can automate 80% of.
- Follow 7 steps, including pre-commit hooks with Husky + lint-staged and CI enforcement, to remove manual style fixes from reviews.
- Configure ESLint flat configs with TypeScript and React support and pair them with Prettier for consistent formatting across your team.
- Integrate VS Code auto-fix on save and GitHub Actions to enforce standards, cutting PR review time from 15 minutes to about 2 minutes.
- Use Gitar’s free AI auto-fixes for CI failures to move toward zero-touch code reviews.
The Problem: Endless PR Nits Are Killing Your Velocity
AI coding assistants have fundamentally changed how developers work and ship features. Tools like GitHub Copilot and Cursor let engineers generate code 3 to 5 times faster than before. This acceleration creates a cascade problem: more generated code means more PRs, more potential issues, and much more review overhead.
Recent numbers highlight the impact. Code duplication has increased 4x with AI-generated code, and logic or correctness issues are 75% more common in AI-assisted PRs. Teams report spending 15 minutes per PR on manual style fixes that automated tools can handle in under 2 minutes. For a 20-developer team, that time sink adds up to more than $1 million per year in lost productivity.

Traditional code reviews now drown in bikeshedding about semicolons, indentation, and formatting preferences. Meanwhile, critical security vulnerabilities and architectural flaws slip through because reviewers are busy with low-value comments. Systematic automation with ESLint for error detection and Prettier for consistent formatting solves this problem at the source.
Step-by-Step Automation with ESLint and Prettier
Step 1: Install ESLint, Prettier, and Shareable Configs
Begin with a comprehensive installation that supports TypeScript and React projects. Run this command to install all required dependencies:
npm i -D eslint prettier eslint-config-prettier @typescript-eslint/eslint-plugin typescript-eslint eslint-plugin-react-hooks
For modern TypeScript projects, use the recommended ESLint flat config with tseslint.configs.strict and tseslint.configs.stylistic for thorough TypeScript support. For React projects, add pluginReact.configs.flat.recommended with react version 'detect' to align rules with your installed React version.
Step 2: Create Core .eslintrc and .prettierrc Configs
Define your ESLint configuration using the flat config format so rules stay consistent across environments. For projects using Expo, extend the expoConfig and eslintPluginPrettierRecommended configurations:
{ "extends": ["expo", "prettier"], "plugins": ["prettier"], "rules": { "prettier/prettier": "error", "react/prop-types": "off" }, "ignores": ["dist/*", "node_modules/*"] }
Configure Prettier with a .prettierrc file at your project root so every developer formats code the same way:
{ "semi": false, "singleQuote": true, "tabWidth": 2, "trailingComma": "es5" }
Step 3: Wire ESLint and Prettier into VS Code
Connect ESLint and Prettier directly to your editor to fix issues before they reach Git. Install the ESLint and Prettier extensions in VS Code, then update your settings.json to enable auto-fix on save:
{ "editor.formatOnSave": true, "editor.codeActionsOnSave": { "source.fixAll.eslint": true }, "editor.defaultFormatter": "esbenp.prettier-vscode" }
Step 4: Add Pre-Commit Hooks with Husky and lint-staged
Use pre-commit hooks to block broken or poorly formatted code from entering your repository. Initialize Husky and install lint-staged with this command:
npx husky-init && npm i -D lint-staged
Configure your package.json with lint-staged rules so only changed files run through ESLint and Prettier:
{ "lint-staged": { "*.{ts,tsx,js,jsx}": [ "eslint --fix", "prettier --write" ] } }
Update .husky/pre-commit to trigger lint-staged on each commit:
npx lint-staged
Step 5: Enforce Linting and Formatting in CI
Enforce your standards in CI so every PR passes the same checks before merging. Create .github/workflows/lint.yml with this workflow:
name: Lint and Format on: [push, pull_request] jobs: lint: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version: '18' cache: 'npm' - run: npm ci - run: npm run lint - run: npm run format:check
Step 6: Fix Common ESLint and Prettier Pitfalls
Monorepo setups need careful ignore patterns so tooling stays fast and accurate. Add workspace-specific .eslintignore files and configure ignores arrays in your flat config for each package. For better performance, consider parallel execution tools like lefthook instead of sequential Husky and lint-staged workflows.
Resolve ESLint and Prettier conflicts by loading eslint-config-prettier last in your extends array so it disables overlapping stylistic rules. For ES modules, confirm your package.json includes "type": "module" and use .mjs extensions for configuration files to avoid import and parsing issues.
Step 7: Measure ROI with Concrete Benchmarks
Track your improvements with clear metrics so the team sees the payoff from automation:
| Metric | Manual Process | Automated Setup |
|---|---|---|
| Time per PR | 15 minutes | 2 minutes |
| Review Speedup | – | 40-50% |
| Style Comments | 8-12 per PR | 0-1 per PR |
| CI Reruns | 3-5 per PR | 1-2 per PR |
Supercharge ESLint and Prettier with Gitar AI Auto-Fixes
ESLint and Prettier remove most style issues, but escaped problems still demand manual fixes and extra CI cycles. Gitar’s free AI platform goes beyond detection and handles the entire loop. It analyzes CI failures, generates validated fixes, and commits them directly to your PRs.

Gitar also changes the cost model for automated help. Competing tools often charge $15 to $30 per developer for suggestions, while Gitar offers unlimited repositories with no cost for code review features. Teams can keep their existing ESLint and Prettier setup and add Gitar as an intelligent repair layer on top.
| Feature | Manual ESLint/Prettier | Gitar AI |
|---|---|---|
| Style Enforcement | Pre-commit hooks | Pre-commit plus automatic fixes |
| CI Failure Handling | Manual debugging | Automatic analysis and fixes |
| Cost | Developer time | Free plus 14-day autofix trial |
Gitar also handles complex scenarios that manual setups often miss. It reduces AI-generated code duplication, catches logic errors in generated functions, and helps with infrastructure-related CI failures. Teams like Pinterest trust Gitar with more than 50 million lines of code, and Tigris reports that Gitar summaries are “more concise than Greptile” for actionable feedback.
Frequently Asked Questions
Does Gitar fix ESLint errors automatically?
Gitar fixes ESLint errors automatically once they appear in CI. The platform analyzes CI failure logs to understand root causes, generates code fixes with full codebase context, validates that the fixes work correctly, and commits them directly to your PR. This automation applies to lint errors, test failures, and build breaks through the autofix features, which include a 14-day free trial.
How does Husky compare to Gitar for code quality?
Husky with lint-staged protects your repository by blocking issues at commit time. Gitar focuses on healing problems that escape into CI. The tools work together effectively. Husky catches obvious style violations locally, while Gitar handles complex failures that need deeper analysis and a full view of the codebase.
Is Gitar’s code review really free forever?
Gitar’s core code review features remain free for long-term use. PR summaries, security scanning, and bug detection stay available for unlimited repositories with no seat limits. The autofix capabilities include a 14-day free trial, and teams can upgrade to paid plans afterward to keep using automated fixes.
Does Gitar support monorepo configurations?
Gitar supports monorepos and large enterprise codebases at scale. The platform handles more than 50 million lines of code and thousands of PRs per day. It uses hierarchical memory at the line, PR, repository, and organization levels to provide intelligent analysis across complex structures.
How does Gitar integrate with existing GitHub Actions workflows?
Gitar integrates directly with GitHub Actions and fits into your current CI setup. The platform also supports GitLab CI, CircleCI, and Buildkite for teams using other providers. Gitar analyzes your existing CI configuration and works within your current workflow without forcing changes to established processes.
Conclusion: Move Toward Zero-Touch Code Reviews
Automated ESLint and Prettier setups with pre-commit hooks and CI enforcement remove about 80% of style-related PR comments. Some issues still slip through and require manual intervention, which slows teams down. Gitar’s AI platform closes that gap by fixing problems instead of only flagging them.
The combined approach delivers clear velocity gains. Teams see 40 to 50 percent faster review cycles, fewer context switches, and more focus on architecture rather than formatting debates. With ESLint, Prettier, and Gitar working together, zero-touch code reviews move from aspiration to a realistic target.
