[gnome-shell-extensions] lint: Sync configuration with gjs
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell-extensions] lint: Sync configuration with gjs
- Date: Sat, 14 Nov 2020 00:00:43 +0000 (UTC)
commit 72c67aacc495cceb19fb1633c58360ade834537a
Author: Florian Müllner <fmuellner gnome org>
Date: Fri May 15 00:26:21 2020 +0200
lint: Sync configuration with gjs
gjs updated its eslint configuration, so sync our copy.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/137
lint/eslintrc-gjs.yml | 21 +++++++++++++++------
1 file changed, 15 insertions(+), 6 deletions(-)
---
diff --git a/lint/eslintrc-gjs.yml b/lint/eslintrc-gjs.yml
index 53d5fbd..13114fa 100644
--- a/lint/eslintrc-gjs.yml
+++ b/lint/eslintrc-gjs.yml
@@ -1,4 +1,5 @@
---
+# SPDX-License-Identifier: MIT OR LGPL-2.0-or-later
env:
es6: true
extends: 'eslint:recommended'
@@ -24,7 +25,9 @@ rules:
# allow: [^vfunc_, ^on_, _instance_init]
comma-dangle:
- error
- - always-multiline
+ - arrays: always-multiline
+ objects: always-multiline
+ functions: never
comma-spacing:
- error
- before: false
@@ -87,6 +90,7 @@ rules:
- error
- all
- conditionalAssign: false
+ nestedBinaryExpressions: false
returnAssign: false
no-implicit-coercion:
- error
@@ -105,15 +109,15 @@ rules:
no-prototype-builtins: 'off'
no-restricted-properties:
- error
+ - object: Lang
+ property: copyProperties
+ message: Use Object.assign()
- object: Lang
property: bind
message: Use arrow notation or Function.prototype.bind()
- object: Lang
property: Class
message: Use ES6 classes
- - object: imports
- property: mainloop
- message: Use GLib main loops and timeouts
no-restricted-syntax:
- error
- selector: >-
@@ -129,6 +133,8 @@ rules:
BlockStatement[body.length=1]
CallExpression[arguments.length=0][callee.object.type="Super"][callee.property.name="_init"]
message: _init() that only calls super._init() is unnecessary
+ - selector: BinaryExpression[operator="instanceof"][right.name="Array"]
+ message: Use Array.isArray()
no-return-assign: error
no-return-await: error
no-self-compare: error
@@ -165,6 +171,9 @@ rules:
object-shorthand: error
operator-assignment: error
operator-linebreak: error
+ padded-blocks:
+ - error
+ - never
# These may be a bit controversial, we can try them out and enable them later
# prefer-const: error
# prefer-destructuring: error
@@ -217,12 +226,12 @@ globals:
ARGV: readonly
Debugger: readonly
GIRepositoryGType: readonly
+ globalThis: readonly
imports: readonly
Intl: readonly
log: readonly
logError: readonly
print: readonly
printerr: readonly
- window: readonly
parserOptions:
- ecmaVersion: 2017
+ ecmaVersion: 2020
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]