eslint-config-prettier
Advanced tools
Changelog
Version 8.8.0 (2023-03-20)
Changelog
Version 8.7.0 (2023-03-06)
Changelog
Version 8.6.0 (2023-01-02)
Changelog
Version 8.5.0 (2022-03-02)
Changelog
Version 8.4.0 (2022-02-19)
Changelog
Version 8.3.0 (2021-04-24)
Changelog
Version 8.2.0 (2021-04-13)
Changelog
Version 8.1.0 (2021-02-24)
Changelog
Version 8.0.0 (2021-02-21)
Changed: All configs have been merged into one!
To upgrade, change:
{
"extends": [
"some-other-config-you-use",
"prettier",
"prettier/@typescript-eslint",
"prettier/babel",
"prettier/flowtype",
"prettier/react",
"prettier/standard",
"prettier/unicorn",
"prettier/vue"
]
}
Into:
<!-- prettier-ignore -->{
"extends": [
"some-other-config-you-use",
"prettier"
]
}
The "prettier"
config now includes not just ESLint core rules, but also rules from all plugins. Much simpler!
So … what’s the catch? Why haven’t we done this earlier? Turns out it’s just a sad mistake. I (@lydell) was confused when testing, and thought that turning off unknown rules in a config was an error. Thanks to Georgii Dolzhykov (@thorn0) for pointing this out!
If you use [eslint-plugin-prettier], all you need is [plugin:prettier/recommended]:
<!-- prettier-ignore -->{
"extends": [
"some-other-config-you-use",
"plugin:prettier/recommended"
]
}
(The ["prettier/prettier" config][prettier-prettier-config] still exists separately. It’s the odd one out. The main "prettier"
config does not include the rules from it.)
Changed: The CLI helper tool now only prints warnings for [arrow-body-style] and [prefer-arrow-callback], just like other “special rules.” This means that if you’ve decided to use those rules and [eslint-plugin-prettier] at the same time, you’ll get warnings but exit code zero (success).