Created
April 20, 2018 11:30
-
-
Save shmidt-i/b477dc167fb0985c3546268a62f11b53 to your computer and use it in GitHub Desktop.
Eslint fix formatting object expression in ternary expression
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Eslint thinks that its wrong: | |
errorOrMessage instanceof Error | |
? { | |
error: errorOrMessage, | |
meta, | |
} | |
: { | |
error: new Error(errorOrMessage), | |
meta, | |
}; | |
// But prettier do so! | |
// Configure eslint: | |
// "indent": ["error", 2, { "SwitchCase": 1, "ignoredNodes": ["ConditionalExpression > ObjectExpression"] }], |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment