From 7827ff85e0a8ecef3c2cd3598a82b0bf4ba868a3 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 14 Jul 2019 04:02:24 +0900 Subject: [PATCH] Update CONTRIBUTING.md --- CONTRIBUTING.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ea427b2c0..1d88812f7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -79,6 +79,20 @@ Good: if (foo) bar; ``` +### 特別な理由がない限り`===`を使う +🥰 + +### null系を除いて、bool以外の値をifに渡さない +Bad: +``` ts +if (foo.length) +``` + +Good: +``` ts +if (foo.length > 0) +``` + ### `export default`を使わない インテリセンスと相性が悪かったりするため