[gjs: 3/5] lint: Restrict deprecated Lang API
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs: 3/5] lint: Restrict deprecated Lang API
- Date: Sat, 2 Mar 2019 20:36:39 +0000 (UTC)
commit cbf36f6d2819987253d52d5c1edbac4e8aedcebc
Author: Florian Müllner <fmuellner gnome org>
Date: Tue Feb 19 21:33:05 2019 +0100
lint: Restrict deprecated Lang API
Both Lang.Class and Lang.bind are considered legacy, and the ES5/6
replacements should be used instead.
https://gitlab.gnome.org/GNOME/gjs/merge_requests/272
[skip eslint] as this will change the eslint outcome.
.eslintrc.json | 13 +++++++++++++
1 file changed, 13 insertions(+)
---
diff --git a/.eslintrc.json b/.eslintrc.json
index 06dfe1ee..85d198be 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -58,6 +58,19 @@
"allow": ["!!"]
}
],
+ "no-restricted-properties": [
+ "error",
+ {
+ "object": "Lang",
+ "property": "bind",
+ "message": "Use arrow notation or Function.prototype.bind()"
+ },
+ {
+ "object": "Lang",
+ "property": "Class",
+ "message": "Use ES6 classes"
+ }
+ ],
"nonblock-statement-body-position": [
"error",
"below"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]