[polari/wip/fmuellner/tracker: 318/335] lint: Restrict deprecated Lang API



commit 3109c72963d27e039a8b30476adb439b502c5789
Author: Florian Müllner <fmuellner gnome org>
Date:   Tue Feb 12 11:09:02 2019 +0100

    lint: Restrict deprecated Lang API
    
    Now that we moved to ES standard replacements, let's make sure they
    don't creep back in accidentally.

 lint/eslintrc-polari.json | 13 +++++++++++++
 1 file changed, 13 insertions(+)
---
diff --git a/lint/eslintrc-polari.json b/lint/eslintrc-polari.json
index 0969b9b..0f13cf6 100644
--- a/lint/eslintrc-polari.json
+++ b/lint/eslintrc-polari.json
@@ -35,6 +35,19 @@
                 "afterColon": true
             }
         ],
+        "no-restricted-properties": [
+            "error",
+            {
+                "object": "Lang",
+                "property": "bind",
+                "message": "Please use arrow notation or Function.prototype.bind()."
+            },
+            {
+                "object": "Lang",
+                "property": "Class",
+                "message": "Please use ES6 classes."
+            }
+        ],
         "no-unused-vars": [
             "error",
             {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]