From 6846067a5d934d4b44c1cf397f7c185e9829ea4a 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`を使わない インテリセンスと相性が悪かったりするため