omiid
homenotebookai usage

Adding prettier to eslint

April 10, 2025 · Updated on August 09, 2026

ESLint and Prettier do different jobs. ESLint finds problematic patterns in your JS/TS code. Prettier formats it. Run both without wiring them together and they disagree about spacing, quotes, and line breaks, because ESLint ships stylistic rules of its own.

The fix is to extend your ESLint config from Prettier, which switches those stylistic rules off. Adding prettier to the extends array on its own usually fails first.

Install eslint-config-prettier before you extend from it

If you encounter the error:

ESLint couldn't find the config "prettier" to extend from. Please check that the name of the config is correct.

The eslint-config-prettier package is missing from your project. That package turns off all ESLint rules that are unnecessary or might conflict with Prettier. Install it with your package manager:

pnpm add -D eslint-config-prettier

Put prettier last in the extends array

Once installed, update your ESLint configuration file (usually .eslintrc.js or .eslintrc.json) to include prettier in the extends array. Order matters: it has to come after the configs whose stylistic rules you want disabled.

{
	"extends": ["eslint:recommended", "plugin:prettier/recommended"]
}

plugin:prettier/recommended comes from eslint-plugin-prettier, so install that package too. It extends eslint-config-prettier for you and also reports formatting differences as ESLint errors. If you only want the conflicts gone and prefer to run Prettier on its own, extend from "prettier" instead and skip the plugin.

tl;dr

To integrate Prettier with ESLint, install eslint-config-prettier and add it to your ESLint configuration. This resolves conflicts between ESLint and Prettier, ensuring your code is both high-quality and consistently styled.

Join My Newsletter

Occasional notes on software, tools, and things I learn. No spam.

Unsubscribe anytime.

Continue Reading
  • Tuning Postgres and pgvector: the three knobs that matter08-18-2026 · Most pgvector performance problems come down to three settings. This post shows how to read an ANN query plan and tune ef_search, shared_buffers, and work_mem in the right order.
  • AI text watermarking: how it works and what it can't do08-16-2026 · Claude now watermarks its text. The watermark changes where the randomness in word choice comes from, not what the model can say. Here is the whole pipeline, with simulations you can poke at.
  • HNSW vs IVFFlat: choosing and building your pgvector index08-14-2026 · Past a few hundred thousand rows, an exact scan stops being fast enough. Here is how to pick between HNSW and IVFFlat and build the index without locking the table.
  • Vector search relevance: chunking, metadata, and the 0.81 problem08-11-2026 · Most bad vector search results come from one of three failure modes: chunking, modality mismatch, or a confused model. Each one has a specific diagnostic and a specific fix.
  • pgvector setup: your first multimodal query in TypeScript08-03-2026 · One Postgres table can hold text and screenshot embeddings in the same vector column. This post sets up the schema, the Voyage embedding call, and the first query that returns both.