if文で改行された単一ステートメントに中括弧を強制したい

:::note
## 結論
multi-line,consistentを採用する方針となりました
:::

# 背景
```ts
const longlonglonglonglonglongVariabe = 1;
const longlonglonglonglonglongFunc = (num) => {console.log(num)}
if(a)
    longlonglonglonglonglongFunc(longlonglonglonglonglongVariabe);
longlonglonglonglonglongFunc(longlonglonglonglonglongVariabe);
```
ifがlonglonglonglonglonglongFunc(longlonglonglonglonglongVariabe)
どちらも中括弧でくくる必要があるのか分からない時があります。
このような時に誤って修正し、バグが起きたりします。

ルール化することで条件分岐でのバグを防ぐことができます。
そこで今回はESLintのcurlyのruleを調査したいと思います。

https://eslint.org/docs/latest/rules/curly

# curlyとは
すべての制御文に一貫したブレーススタイル（中括弧のスタイル）を強制します

## 今回満たしたい条件
- 改行された単一ステートメントに中括弧を強制する
- 改行なし単一ステートメントでのブレーススタイルの柔軟性（中括弧を付けても付けなくてもOK）

## curlyのOptionから条件を満たすものを検討する

```multi-line```,```consistent```を採用する方針となりました。
以下調査結果の概要です。
|オプション| 採用/不採用 |強制させる条件|デメリット| メリット
| ---- | ---- |----|----| ----
| all | 不採用 |全て|全てに適用される|
| multi | 不採用 |複数ステートメント|改行されたステートメントだと中括弧がされない|
| multi-line |採用| 複数行 |1行に複数のステートメントを書くと中括弧がされない|
|multi-or-nest|不採用| if、else、for、while、doの本体が複数行の時 |multi-or-nestだと、1ステートメントの時に中括弧を付けられない|multi-lineと違って、改行してもしてなくても1ステートメントのみの場合は強制しないで良い
|multi*,consistent|採用|multiオプションのいずれかと併用し、if,else if else chainの全てのボディを中括弧有または無に統一させるよう強制 |採用（あっても良いかも）|統一できるので見やすくなる

次に解説です。
## 解説

### all
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/405182/a4c0142f-4b8b-e116-3e13-8c97cfaa37ab.png)

https://eslint.org/play/#eyJ0ZXh0IjoiLyplc2xpbnQgY3VybHk6IFtcImVycm9yXCIsIFwiYWxsXCJdKi9cbmNvbnN0IGxvbmdsb25nbG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aXMtYmVmb3JlLXN1cGVyIjpbImVycm9yIl0sIm5vLXVuZGVmIjpbImVycm9yIl0sIm5vLXVuZXhwZWN0ZWQtbXVsdGlsaW5lIjpbImVycm9yIl0sIm5vLXVucmVhY2hhYmxlIjpbImVycm9yIl0sIm5vLXVuc2FmZS1maW5hbGx5IjpbImVycm9yIl0sIm5vLXVuc2FmZS1uZWdhdGlvbiI6WyJlcnJvciJdLCJuby11bnNhZmUtb3B0aW9uYWwtY2hhaW5pbmciOlsiZXJyb3IiXSwibm8tdW51c2VkLWxhYmVscyI6WyJlcnJvciJdLCJuby11bnVzZWQtdmFycyI6WyJlcnJvciJdLCJuby11c2VsZXNzLWJhY2tyZWZlcmVuY2UiOlsiZXJyb3IiXSwibm8tdXNlbGVzcy1jYXRjaCI6WyJlcnJvciJdLCJuby11c2VsZXNzLWVzY2FwZSI6WyJlcnJvciJdLCJuby13aXRoIjpbImVycm9yIl0sInJlcXVpcmUteWllbGQiOlsiZXJyb3IiXSwidXNlLWlzbmFuIjpbImVycm9yIl0sInZhbGlkLXR5cGVvZiI6WyJlcnJvciJdfSwicGFyc2VyT3B0aW9ucyI6eyJlY21hRmVhdHVyZXMiOnt9LCJlY21hVmVyc2lvbiI6ImxhdGVzdCIsInNvdXJjZVR5cGUiOiJzY3JpcHQifX19

改行してなくても中括弧を強制されてしまいます。

### multi
改行なし単一ステートメントでのブレーススタイルの柔軟性が失われます。
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/405182/2503a4ca-a351-549a-2937-2d338e3c63b6.png)

改行された単一ステートメントに中括弧を付けるとエラーになるので不採用ですね。
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/405182/ff346d57-b447-a513-5802-27900aa6bf42.png)

https://eslint.org/play/#eyJ0ZXh0IjoiLyplc2xpbnQgY3VybHk6IFtcImVycm9yXCIsIFwibXVsdGlcIl0qL1xuY29uc3QgbG9uZ2xvbmdsb25nbG9uZ2xvbmdsb25nVmFyaWFiZ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Juby1zcGFyc2UtYXJyYXlzIjpbImVycm9yIl0sIm5vLXRoaXMtYmVmb3JlLXN1cGVyIjpbImVycm9yIl0sIm5vLXVuZGVmIjpbImVycm9yIl0sIm5vLXVuZXhwZWN0ZWQtbXVsdGlsaW5lIjpbImVycm9yIl0sIm5vLXVucmVhY2hhYmxlIjpbImVycm9yIl0sIm5vLXVuc2FmZS1maW5hbGx5IjpbImVycm9yIl0sIm5vLXVuc2FmZS1uZWdhdGlvbiI6WyJlcnJvciJdLCJuby11bnNhZmUtb3B0aW9uYWwtY2hhaW5pbmciOlsiZXJyb3IiXSwibm8tdW51c2VkLWxhYmVscyI6WyJlcnJvciJdLCJuby11bnVzZWQtdmFycyI6WyJlcnJvciJdLCJuby11c2VsZXNzLWJhY2tyZWZlcmVuY2UiOlsiZXJyb3IiXSwibm8tdXNlbGVzcy1jYXRjaCI6WyJlcnJvciJdLCJuby11c2VsZXNzLWVzY2FwZSI6WyJlcnJvciJdLCJuby13aXRoIjpbImVycm9yIl0sInJlcXVpcmUteWllbGQiOlsiZXJyb3IiXSwidXNlLWlzbmFuIjpbImVycm9yIl0sInZhbGlkLXR5cGVvZiI6WyJlcnJvciJdfSwicGFyc2VyT3B0aW9ucyI6eyJlY21hRmVhdHVyZXMiOnt9LCJlY21hVmVyc2lvbiI6ImxhdGVzdCIsInNvdXJjZVR5cGUiOiJzY3JpcHQifX19

### multi-line
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/405182/2a886a0e-597e-e2a0-f8d2-042e995f5cf4.png)
改行なし単一ステートメントでのブレーススタイルの柔軟性と改行あり単一ステートメントで中括弧を強制しているため、条件を満たしています。

https://eslint.org/play/#eyJ0ZXh0IjoiLyplc2xpbnQgY3VybHk6IFtcImVycm9yXCIsIFwibXVsdGktbGluZVwiXSovXG5jb25zdCBsb25nbG9uZ2xvbmdsb25nbG9uZ2xvbmdWYXJpYWJlID0gMTtcbmNvbnN0IGxvbmdsb25nbG9uZ2xvbmdsb25nb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GgiOlsiZXJyb3IiXSwicmVxdWlyZS15aWVsZCI6WyJlcnJvciJdLCJ1c2UtaXNuYW4iOlsiZXJyb3IiXSwidmFsaWQtdHlwZW9mIjpbImVycm9yIl19LCJwYXJzZXJPcHRpb25zIjp7ImVjbWFGZWF0dXJlcyI6e30sImVjbWFWZXJzaW9uIjoibGF0ZXN0Iiwic291cmNlVHlwZSI6InNjcmlwdCJ9fX0=

### multi-or-nest
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/405182/64a65e17-9e26-639c-2102-d1f8e0d4386f.png)

改行なし単一ステートメントでのブレーススタイルの柔軟性で失われているので不採用とします。

https://eslint.org/play/#eyJ0ZXh0IjoiLyplc2xpbnQgY3VybHk6IFtcImVycm9yXCIsIFwibXVsdGktb3ItbmVzdFwiXSovXG5jb25zdCBsb25nbG9uZ2xvbmdsb25nbG9uZ2xvbmdWYXJpYWJlID0gMTtcbmNvbnN0IGxvbmdsb25nbG9uZ2xvbmdsb25nbG9uZ0Z1bmMgPSAobnVtKSA9PiB7Y29uc29sZS5sb2cobnVtKX1cblxuY29uc3QgYSA9IHRydWU7XG5pZihhKWxvbmdsb25nbG9uZ2xvbmdsb25nbG9uZ0Z1bmMobG9uZ2xvbmdsb25nbG9uZ2xvbmdsb25nVmFyaWFiZSlcblxuaWYoYSl7bG9uZ2xvbmdsb25nbG9uZ2xvbmdsb25nRnVuYyhsb25nbG9uZ2xvbmdsb25nbG9uZ2xvbmdWYXJpYWJlKTt9XG5cbmlmKGEpXG4gIGxvbmdsb25nbG9uZ2xvbmdsb25nbG9uZ0Z1bmMobG9uZ2xvbmdsb25nbG9uZ2xvbmdsb25nVmFyaWFiZSk7XG5cbmlmKGEpe1xuICBsb25nbG9uZ2xvbmdsb25nbG9uZ2xvbmdGdW5jKGxvbmdsb25nbG9uZ2xvbmdsb25nbG9uZ1ZhcmlhYmUpO1xufVxuXG5pZihhKXtcbiAgbG9uZ2xvbmdsb25nbG9uZ2xvbmdsb25nRnV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5vLXNwYXJzZS1hcnJheXMiOlsiZXJyb3IiXSwibm8tdGhpcy1iZWZvcmUtc3VwZXIiOlsiZXJyb3IiXSwibm8tdW5kZWYiOlsiZXJyb3IiXSwibm8tdW5leHBlY3RlZC1tdWx0aWxpbmUiOlsiZXJyb3IiXSwibm8tdW5yZWFjaGFibGUiOlsiZXJyb3IiXSwibm8tdW5zYWZlLWZpbmFsbHkiOlsiZXJyb3IiXSwibm8tdW5zYWZlLW5lZ2F0aW9uIjpbImVycm9yIl0sIm5vLXVuc2FmZS1vcHRpb25hbC1jaGFpbmluZyI6WyJlcnJvciJdLCJuby11bnVzZWQtbGFiZWxzIjpbImVycm9yIl0sIm5vLXVudXNlZC12YXJzIjpbImVycm9yIl0sIm5vLXVzZWxlc3MtYmFja3JlZmVyZW5jZSI6WyJlcnJvciJdLCJuby11c2VsZXNzLWNhdGNoIjpbImVycm9yIl0sIm5vLXVzZWxlc3MtZXNjYXBlIjpbImVycm9yIl0sIm5vLXdpdGgiOlsiZXJyb3IiXSwicmVxdWlyZS15aWVsZCI6WyJlcnJvciJdLCJ1c2UtaXNuYW4iOlsiZXJyb3IiXSwidmFsaWQtdHlwZW9mIjpbImVycm9yIl19LCJwYXJzZXJPcHRpb25zIjp7ImVjbWFGZWF0dXJlcyI6e30sImVjbWFWZXJzaW9uIjoibGF0ZXN0Iiwic291cmNlVHlwZSI6InNjcmlwdCJ9fX0=

### consistent
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/405182/5e594c86-9ad8-ccb6-b5ee-7ffa26a21694.png)

https://eslint.org/play/#eyJ0ZXh0IjoiLyplc2xpbnQgY3VybHk6IFtcImVycm9yXCIsIFwibXVsdGktbGluZVwiLCBcImNvbnNpc3RlbnRcIl0qL1xuY29uc3QgbG9uZ2xvbmdsb25nbG9uZ2xvbmdsb25nVmFyaWFiZSA9IDE7XG5jb25zdCBsb25nbG9uZ2xvbmdsb25nbG9uZ2xvbmdGdW5jID0gKG51bSkgPT4ge2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Il0sInZhbGlkLXR5cGVvZiI6WyJlcnJvciJdfSwicGFyc2VyT3B0aW9ucyI6eyJlY21hRmVhdHVyZXMiOnt9LCJlY21hVmVyc2lvbiI6ImxhdGVzdCIsInNvdXJjZVR5cGUiOiJzY3JpcHQifX19

if,else if,elseでブレーススタイルを統一できるので可読性が上がるのかなと思いました。
これはおまけなのであってもなくても大丈夫かなと思います。

# 最後に
これからもESLintのruleをうまく活用してコードを安全に実装し、バグが出にくいコードにしていきたいです。

# 参考
- [eslint brace-style](https://runebook.dev/ja/docs/eslint/rules/brace-style)