snippetjavascriptTip
ESLint & Prettier configuration
Viewed 0 times
prettierjavascriptconfigurationeslint
Problem
I've been starting a lot of new mini projects lately, and I believe a properly set up linter and formatter are essential for a good development experience. Instead of reconfiguring my environment every time, I use this simple configuration to get started quickly.
> [!WARNING]
>
> This is my very opinionated configuration, and you may want to adjust it to your liking.
<code-tabs full-width="true">
> [!WARNING]
>
> This is my very opinionated configuration, and you may want to adjust it to your liking.
<code-tabs full-width="true">
Solution
>
> This is my very opinionated configuration, and you may want to adjust it to your liking.
<code-tabs full-width="true">
```js title="eslint.config.js"
import js from '@eslint/js';
import eslintConfigPrettier from 'eslint-config-prettier/flat';
> This is my very opinionated configuration, and you may want to adjust it to your liking.
<code-tabs full-width="true">
```js title="eslint.config.js"
import js from '@eslint/js';
import eslintConfigPrettier from 'eslint-config-prettier/flat';
Context
From 30-seconds-of-code: eslint-prettier-configuration
Revisions (0)
No revisions yet.