Configure ESLint and Prettier for a Project
Configure ESLint and Prettier from scratch with pre-commit hooks, IDE integration, and CI for standardizing your team's code.
Paste in your AI
Paste this prompt in ChatGPT, Claude or Gemini and customize the variables in brackets.
You are an expert in JavaScript tooling and code quality. I need to set up ESLint and Prettier to standardize the code in my project.
Project type:
[e.g. React with TypeScript, Node.js API in pure JavaScript, Next.js project, npm library]
Desired configuration:
- Base style guide: [e.g. Airbnb, Standard, Google, or custom configuration]
- TypeScript: [Yes/No]
- Important specific rules for my team: [e.g. no console.log in production, sorted imports, max line length 100]
- Specific framework: [e.g. React hooks rules, Jest rules for tests]
Environment:
- IDE: [e.g. VS Code, WebStorm, Vim]
- Node.js version: [e.g. 20.x]
Create a complete, ready-to-use configuration:
- Installation: npm/yarn commands for all the necessary dependencies with exact versions.
- .eslintrc.json or eslint.config.js: complete ESLint configuration with plugins, rules, and ignores.
- .prettierrc: Prettier configuration consistent with ESLint (no conflicts).
- .eslintignore and .prettierignore: exclusion files suited to the project.
- npm scripts: lint, lint:fix, format scripts in package.json.
- VS Code configuration (.vscode/settings.json): format on save, integrated ESLint.
- Husky + lint-staged: pre-commit hook that lints and formats only the modified files.
- CI: GitHub Actions step to check linting.
Explain the most important rules and why they improve code quality.
Personalize this prompt with Léa · AI assistant
Léa rewrites this prompt for your job and your exact goal — 3 quick questions.
Why this prompt works
This prompt covers the entire code quality ecosystem around ESLint and Prettier, from initial configuration to CI integration through pre-commit hooks. This holistic approach ensures code standards are enforced at every step of the development workflow. Managing conflicts between ESLint and Prettier is a classic problem this prompt explicitly addresses: without coordinated configuration (eslint-config-prettier to disable ESLint formatting rules), the two tools contradict each other and generate endless frustrations. Using lint-staged rather than linting the entire project on every commit is an important performance optimization for large codebases: linting only modified files reduces pre-commit hook time from several minutes to a few seconds.
Use Cases
Expected Output
Complete ESLint and Prettier configuration files, npm scripts, VS Code configuration, Husky setup, and GitHub Actions step.
Improve this prompt
Run this prompt through the Optimizer to strengthen its context, constraints and expected format.
Improve this prompt with the OptimizerComments
Be the first to comment on this prompt.
Glossary Terms
📬 Get new prompts every week
Join our newsletter and never miss a prompt.
Go further
Improve this prompt with the Optimizer
Analyze the prompt, strengthen the context and get a more precise version.
Gemini Prompts
Practical methods to use Gemini more effectively in your prompts.
AI prompts for web developers
Code review and debugging, keeping API keys and secrets out of the prompt.
Security, GDPR & Business Plans
ChatGPT Business, Claude Team, Gemini Workspace and Mistral Vibe compared from vendor sources: training, EU hosting and a GDPR checklist.
Similar Prompts
Task brief for Claude Code: frame a feature end to end
Brief template to delegate a complete feature to Claude Code: goal, starting point, constraints, definition of done, working rules and recap format.
Write a project's CLAUDE.md: the brief Claude Code reads at every session
Turns your project description into a dense CLAUDE.md: commands, structure, conventions, pitfalls, off-limits areas and situations where the agent must ask before acting.
Design a Secure Webhook API
Design a webhook API with event subscriptions, signed deliveries, retry limits, and a delivery log your support team can inspect.
Generate Storybook Stories for UI Components
Generate Storybook stories for a UI component, with visual variants, interactive controls, interaction tests, and MDX documentation.