refactor: restructure statement to avoid ESLint vs Prettier conflict
refactor: restructure statement to avoid ESLint vs Prettier conflict

For the most part, we can configure ESLint to not conflict with Prettier
by telling it to leave comments untouched at the beginning and end of
blocks, arrays, objects and classes, but there is no option to tell it
to leave comments untouched inside parenthesized expressions; eg. given:

```
return (
    // This thing.
    a && b ||

    // That thing.
    c && d
);
```

ESLint will try to turn this into:

```
return (

    // This thing.

    a && b ||

    // That thing.

    c && d
);
```

And if you run Prettier on that, it will want:

```
return (
    // This thing.

    a && b ||
    // That thing.

    c && d
);
```

You can see this at play in this diff:

```
diff --git a/plugins/eslint-plugin-liferay/lib/common/imports.js b/plugins/eslint-plugin-liferay/lib/common/imports.js
index d75ebcd..bf9bd9a 100644
--- a/plugins/eslint-plugin-liferay/lib/common/imports.js
+++ b/plugins/eslint-plugin-liferay/lib/common/imports.js
@@ -166,17 +166,14 @@ function isRequireStatement(node) {
 	const {init} = node.declarations[0];

 	return (
-
 		// ie. `const a = require('a');`

 		(init.type === 'CallExpression' && init.callee.name === 'require') ||
-
 		// ie. `const a = require('a').item;`

 		(init.type === 'MemberExpression' &&
 			init.object.type === 'CallExpression' &&
 			init.object.callee.name === 'require') ||
-
 		// ie. `const a = require('a')();`

 		(init.type === 'CallExpression' &&
```

Let's just restructure the code to avoid this kind of conflict.

Closes: https://github.com/liferay/eslint-config-liferay/issues/169

eduardolundgren/eslint-config-liferay