From a70fba709aa7b5c43acbd4abc721a7f17a53e672 Mon Sep 17 00:00:00 2001 From: Ottavio Hartman Date: Thu, 15 Jun 2017 18:51:33 -0400 Subject: [PATCH 1/2] Enable guard-for-in, no-caller, no-floating-decimal, and no-new ESLint rules. --- .eslintrc.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.eslintrc.json b/.eslintrc.json index 5559ce5b6e87..1857b9939180 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,6 +1,10 @@ { "extends": "./Tools/eslint-config-cesium/browser.js", "rules": { + "guard-for-in": ["error"], + "no-caller": ["error"], + "no-floating-decimal": ["error"], + "no-new": ["error"], "no-unused-vars": ["error", {"vars": "all", "args": "none"}] } } From da4a2777c224478fc3912832b4dbb93c4940f208 Mon Sep 17 00:00:00 2001 From: Ottavio Hartman Date: Mon, 19 Jun 2017 10:49:59 -0400 Subject: [PATCH 2/2] Add rule to ESLint shareable config. Update CHANGES.md --- .eslintrc.json | 4 ---- Tools/eslint-config-cesium/CHANGES.md | 3 +++ Tools/eslint-config-cesium/index.js | 1 + 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 1857b9939180..5559ce5b6e87 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,10 +1,6 @@ { "extends": "./Tools/eslint-config-cesium/browser.js", "rules": { - "guard-for-in": ["error"], - "no-caller": ["error"], - "no-floating-decimal": ["error"], - "no-new": ["error"], "no-unused-vars": ["error", {"vars": "all", "args": "none"}] } } diff --git a/Tools/eslint-config-cesium/CHANGES.md b/Tools/eslint-config-cesium/CHANGES.md index e4de4fad8708..48231db74701 100644 --- a/Tools/eslint-config-cesium/CHANGES.md +++ b/Tools/eslint-config-cesium/CHANGES.md @@ -1,5 +1,8 @@ Change Log ========== +### 2.0.0 + +* Enable [`no-floating-decimal`](http://eslint.org/docs/rules/no-floating-decimal) ### 1.0.0 - 2017-06-12 diff --git a/Tools/eslint-config-cesium/index.js b/Tools/eslint-config-cesium/index.js index b3a82e9a3763..9383db082ef4 100644 --- a/Tools/eslint-config-cesium/index.js +++ b/Tools/eslint-config-cesium/index.js @@ -25,6 +25,7 @@ module.exports = { 'no-empty': ['error'], 'no-extend-native': ['error'], 'no-extra-boolean-cast': 'off', + 'no-floating-decimal': ['error'], 'no-irregular-whitespace': ['error'], 'no-new': ['error'], 'no-undef': ['error'],