prettier / eslint-config-prettier

Turns off all rules that are unnecessary or might conflict with Prettier.
MIT License
5.46k stars 255 forks source link

In v8.0.0 prettier/recommend is it imported too? #176

Closed sandhilt closed 3 years ago

sandhilt commented 3 years ago

In changelog has written:

The "prettier" config now includes not just ESLint core rules, but also rules from all plugins. Much simpler!

Reference: CHANGELOG.md

This also included plugin:prettier/recommended ?

Sorry for the silly question, is that like the others are part of prettier/*.

lydell commented 3 years ago

Hi!

The answer is: No.

Everything in "extends" that start with plugin: comes from plugins. This is a config, so it’s not coming from this package (it comes from eslint-plugin-prettier itself). I think it’s sad that the whole eslint-config-prettier + eslint-plugin-prettier thing is so confusing. See also: https://github.com/prettier/eslint-config-prettier#arrow-body-style-and-prefer-arrow-callback

A tip for the future – it’s easy to look at the source code for ESLint configs to see exactly what they do.

lydell commented 3 years ago

One thing I forgot to mention: It’s almost the other way around. "plugin:prettier/recommended" includes the "prettier" config from this repo. So if you use eslint-plugin-prettier, "plugin:prettier/recommended" should be all you need.

lydell commented 3 years ago

See also #177