would you consider using or doing something like https://github.com/kentcdodds/prettier-eslint for xo --fix ?
more links
https://github.com/jlongster/prettier
https://github.com/kentcdodds/prettier-eslint-cli
Maybe. I'm gonna give it some time to mature first. Right now it's very buggy. I'll keep this issue open.
Relevant: https://github.com/not-an-aardvark/eslint-plugin-prettier
(I use it and think it's great.)
@sindresorhus we will see this feature in a near future ? thanks!
Heads-up: Prettier has just hit v1.0!
I found this issue because I do not fully understand what differentiates Prettier from XO. Wouldn't a Prettier plugin duplicate XO's functionality?
@jangerhofer Prettier is a formatter and XO is a linter that uses ESLint underneath
Oh no. Every time I try prettier I don't like its tricks to shorten the lines.


Why.
Prettier is really mature now and can be easily integrated.. here is an example on how to use it with ESLint https://github.com/lipis/prettier-setup
Prettier is really stable for a while now and used in many large projects (in particular most of Facebook code).
It can be integrated with xo or eslint pretty easily with eslint-plugin-prettier and eslint-config-prettier:
eslint-config-prettier disable all the eslint formatting rules (rules related to comma, spaces etc but not the rules related to code issues) that are covered by prettier.eslint-plugin-prettier report errors/warnings when some code is formatted differently than the prettier format and allow to automatically fix it with --fix.In order to use it with xo it can be configured this way in package.json:
"devDependencies": {
"eslint-config-prettier": "^2.8.0",
"eslint-plugin-prettier": "^2.3.0",
"prettier": "^1.8.2",
"xo": "^0.18.2"
},
"prettier": {
// Any other prettier options
"singleQuote": true
},
"xo": {
"extends": [
"prettier"
],
"plugins": [
"prettier"
],
"rules": {
"prettier/prettier": "error"
}
}
It works well but it requires some configuration and devDpendencies.
In xo we could:
prettier option (true or false, false by default)prettier option is true add eslint-plugin-prettier and eslint-config-prettier and the rule "prettier/prettier": "error"Would you be open to such PR?
Most helpful comment
Maybe. I'm gonna give it some time to mature first. Right now it's very buggy. I'll keep this issue open.