From 76a59d1fbd377a7b21b25e9e7eed72fe99c7b03b Mon Sep 17 00:00:00 2001 From: Olivier Tassinari Date: Sun, 9 Feb 2020 23:54:04 +0100 Subject: [PATCH] [core] No conflict with prettier yet Raised in https://github.com/mui-org/material-ui/pull/19434#discussion_r372437124 --- .eslintrc.js | 1 + packages/material-ui/src/Select/SelectInput.js | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index fbbf2ac8395a85..1310d353f50149 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -39,6 +39,7 @@ module.exports = { // Airbnb use error 'no-param-reassign': 'off', 'no-prototype-builtins': 'off', + 'nonblock-statement-body-position': 'error', // Airbnb restricts isNaN and isFinite which are necessary for IE 11 // we have to be disciplined about the usage and ensure the Number type for its // arguments diff --git a/packages/material-ui/src/Select/SelectInput.js b/packages/material-ui/src/Select/SelectInput.js index c4c230aa393e81..b58b259f0ac023 100644 --- a/packages/material-ui/src/Select/SelectInput.js +++ b/packages/material-ui/src/Select/SelectInput.js @@ -105,9 +105,10 @@ const SelectInput = React.forwardRef(function SelectInput(props, ref) { }; const handleMouseDown = event => { - if (event.button !== 0) - // ignore everything but left-click + // Ignore everything but left-click + if (event.button !== 0) { return; + } // Hijack the default focus behavior. event.preventDefault(); displayNode.focus();