/cursor-tutorials

Why Cursor conflicts with ESLint or Prettier

Learn why Cursor conflicts with ESLint or Prettier and how to fix formatting issues for smoother, consistent development workflows.

Matt Graham, CEO of Rapid Developers

Book a call with an Expert

Starting a new venture? Need to upgrade your web app? RapidDev builds application with your growth in mind.

Book a free No-Code consultation

Why Cursor conflicts with ESLint or Prettier

Cursor often “conflicts” with ESLint or Prettier because all three (Cursor AI, ESLint, and Prettier) try to control or modify your code formatting and structure at the same time. Cursor’s AI suggestions can produce code that doesn’t match your project’s ESLint rules or Prettier style, so when you save the file, ESLint/Prettier immediately rewrites it. This makes it look like Cursor is fighting your formatter. The issue isn’t a bug — it’s that the editor is being pulled in different directions by different tools with different rules.

 

Why These Conflicts Happen

 

The root cause is that Cursor generates code based on patterns it thinks are correct, while ESLint and Prettier enforce strict rules defined in your local project. If those rules don’t match the AI’s output, you get churn, warnings, or broken builds.

  • ESLint is a linting tool. It enforces rules about how your JavaScript or TypeScript code should look or behave. Example: forcing semicolons, disallowing unused variables, enforcing naming conventions.
  • Prettier is a formatting tool. It auto-formats your files based on strict opinions like spacing, line length, and quote styles.
  • Cursor tries to help by auto‑completing or rewriting code across files, but it doesn’t automatically know your project’s exact ESLint/Prettier config unless it’s literally loaded into context.

Because of this, Cursor might write code that:

  • uses single quotes while Prettier enforces double quotes
  • adds semicolons while your config removes them
  • auto‑imports a variable that ESLint flags as unused
  • suggests file patterns that violate your project's lint rules

Then, when you hit save, Prettier or ESLint fix it again. The file jumps around. That looks like a conflict.

 

How This Looks in Real Life

 

Imagine your Prettier config enforces double quotes:

{
  "singleQuote": false
}

But Cursor generates this:

const name = 'Alice'; // Cursor used single quotes

As soon as you save, Prettier rewrites it:

const name = "Alice"; // Prettier enforces double quotes

You see Cursor’s changes disappear, and new diffs appear. That feels like a conflict, but it’s just conflicting formatting rules.

 

Why Cursor Can’t “Automatically Know” Your Rules

 

Cursor runs locally, like VS Code. It doesn’t magically load your entire tooling stack into its brain. It only knows what’s in:

  • the current file
  • the surrounding context window
  • what you explicitly Cmd+K (AI edit) or ask in a prompt
  • your project configuration files if they are included in the context you’re working with

If you don’t show Cursor your .eslintrc or .prettierrc, it will simply use general JavaScript habits, which rarely match your actual project rules.

 

How to Prevent the Conflicts

 

The fixes are simple and something every real Cursor user does eventually:

  • Show Cursor your config files before making big edits. Example prompt: “Follow this ESLint and Prettier config exactly.” Then include the files in the chat or selection.
  • Tell Cursor explicitly when you want code that won’t trigger lint or format errors.
  • Let Prettier handle formatting and ask Cursor to focus only on logic or structure. Cursor doesn’t need to format perfectly if Prettier is enabled on save.
  • Make sure your editor setup isn’t double-formatting (very common). Disable either Prettier plugin or VS Code’s built‑in formatter if they’re both running.

Example: a valid VS Code setting to avoid duplicate formatting:

{
  "editor.formatOnSave": true,
  "editor.defaultFormatter": "esbenp.prettier-vscode"
}

 

The Real Truth

 

Cursor isn’t conflicting with ESLint or Prettier on purpose. It’s just writing code that doesn’t match your project’s rules, and your linters/formatters overwrite it. Once you make Cursor aware of your rules — or you let Prettier do final formatting — the conflicts go away almost completely. This is exactly how senior developers use Cursor daily without issues.

Still stuck?
Copy this prompt into ChatGPT and get a clear, personalized explanation.

This prompt helps an AI assistant understand your setup and guide you through the fix step by step, without assuming technical knowledge.

AI AI Prompt

Want to explore opportunities to work with us?

Connect with our team to unlock the full potential of no-code solutions with a no-commitment consultation!

Book a Free Consultation

Client trust and success are our top priorities

When it comes to serving you, we sweat the little things. That’s why our work makes a big impact.

Rapid Dev was an exceptional project management organization and the best development collaborators I've had the pleasure of working with. They do complex work on extremely fast timelines and effectively manage the testing and pre-launch process to deliver the best possible product. I'm extremely impressed with their execution ability.

CPO, Praction - Arkady Sokolov

May 2, 2023

Working with Matt was comparable to having another co-founder on the team, but without the commitment or cost. He has a strategic mindset and willing to change the scope of the project in real time based on the needs of the client. A true strategic thought partner!

Co-Founder, Arc - Donald Muir

Dec 27, 2022

Rapid Dev are 10/10, excellent communicators - the best I've ever encountered in the tech dev space. They always go the extra mile, they genuinely care, they respond quickly, they're flexible, adaptable and their enthusiasm is amazing.

Co-CEO, Grantify - Mat Westergreen-Thorne

Oct 15, 2022

Rapid Dev is an excellent developer for no-code and low-code solutions.
We’ve had great success since launching the platform in November 2023. In a few months, we’ve gained over 1,000 new active users. We’ve also secured several dozen bookings on the platform and seen about 70% new user month-over-month growth since the launch.

Co-Founder, Church Real Estate Marketplace - Emmanuel Brown

May 1, 2024 

Matt’s dedication to executing our vision and his commitment to the project deadline were impressive. 
This was such a specific project, and Matt really delivered. We worked with a really fast turnaround, and he always delivered. The site was a perfect prop for us!

Production Manager, Media Production Company - Samantha Fekete

Sep 23, 2022