[polari/wip/fmuellner/sync-lint] lint: Sync with gjs
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [polari/wip/fmuellner/sync-lint] lint: Sync with gjs
- Date: Sun, 3 Mar 2019 05:28:23 +0000 (UTC)
commit 6aa8a4183ef935476485e76a0131ec4121db43e4
Author: Florian Müllner <fmuellner gnome org>
Date: Sat Mar 2 22:18:17 2019 +0100
lint: Sync with gjs
Some of our custom rules have been upstreamed[0], update the
rule sets accordingly.
[0] https://gitlab.gnome.org/GNOME/gjs/merge_requests/272
lint/eslintrc-gjs.json | 17 +++++++++++++++++
lint/eslintrc-polari.json | 24 ------------------------
2 files changed, 17 insertions(+), 24 deletions(-)
---
diff --git a/lint/eslintrc-gjs.json b/lint/eslintrc-gjs.json
index b467299..74cadf2 100644
--- a/lint/eslintrc-gjs.json
+++ b/lint/eslintrc-gjs.json
@@ -12,6 +12,7 @@
"error",
"never"
],
+ "arrow-spacing": "error",
"brace-style": "error",
"comma-spacing": [
"error",
@@ -24,6 +25,9 @@
"error",
4,
{
+ "ignoredNodes": [
+ "CallExpression[callee.object.name=GObject][callee.property.name=registerClass] >
ClassExpression:first-child"
+ ],
"MemberExpression": "off"
}
],
@@ -57,6 +61,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"
diff --git a/lint/eslintrc-polari.json b/lint/eslintrc-polari.json
index 0a2d602..1d4bc33 100644
--- a/lint/eslintrc-polari.json
+++ b/lint/eslintrc-polari.json
@@ -1,6 +1,5 @@
{
"rules": {
- "arrow-spacing": "error",
"camelcase": [
"error",
{
@@ -8,29 +7,6 @@
"allow": ["^vfunc_"]
}
],
- "indent": [
- "error",
- 4,
- {
- "ignoredNodes": [
- "CallExpression[callee.object.name=GObject][callee.property.name=registerClass] >
ClassExpression:first-child"
- ],
- "MemberExpression": "off"
- }
- ],
- "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]