From be16ba01ca255d95bd08b23b5e628924a230054c Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Tue, 8 Dec 2015 14:39:37 +0100 Subject: [PATCH] Update coding style rules --- CONTRIBUTING.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index eb361d1791..fcf9df0c46 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -106,7 +106,12 @@ style of the existing OpenLayers 3 code, which includes: * Use `array.length = 0` instead of `goog.array.clear`. - * Use `Object.keys(obj)` instead of `goog.object.getKeys(obj)`. + * Use `v !== undefined` instead of `goog.isDef(v)` and `v === null` instead of + `goog.isNull(v)`. + + * Use ECMAScript 5.1 functions instead of the `goog` equivalents. For example, + use `Object.keys(obj)` instead of `goog.object.getKeys(obj)`, `arr.forEach(f)` + instead of `goog.array.forEach(arr, f)`, etc ... * Use bracket notation instead of `goog.object.set` and `goog.object.get` (with two arguments).