How do I configure eslint to:
Promise.all(promises)
.then(() => {
myExampleFunction()
})
instead of:
Promise.all(promises)
.then(() => {
myExampleFunction()
})
We are using the following eslint packages:
"eslint": "4.12.0",
"eslint-plugin-promise": "3.6.0",
"eslint-plugin-react": "7.5.1",
"eslint-plugin-react-native": "3.2.0",
You can set MemberExpression to 0 as per documentation
"Indent of 2 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces." - indent - Rules
as inline comment
/*eslint indent: ["error", 2, { "MemberExpression": 0 }]*/
in .eslintrc
"rules": {"indent": ["error", 2, { "MemberExpression": 0 }]}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With