[gnome-shell-extensions] lint: Synchronize configuration with gjs



commit 8f362d57fe6c257cf42ef5502d8dc6ded5be4d46
Author: Florian Müllner <fmuellner gnome org>
Date:   Fri Aug 13 02:21:32 2021 +0200

    lint: Synchronize configuration with gjs
    
    Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/180>

 .gitlab-ci.yml        |  4 ++--
 lint/eslintrc-gjs.yml | 32 +++++++++++++++++++++++++++++---
 2 files changed, 31 insertions(+), 5 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index fc61308..61b07cb 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,7 +1,7 @@
 include:
  - remote: 
"https://gitlab.freedesktop.org/freedesktop/ci-templates/-/raw/6f86b8bcb0cd5168c32779c4fea9a893c4a0c046/templates/ci-fairy.yml";
 
-image: registry.gitlab.gnome.org/gnome/gnome-shell/fedora/33:2020-11-17.0
+image: registry.gitlab.gnome.org/gnome/gnome-shell/fedora/34:2021-08-12.0
 
 stages:
  - pre_review
@@ -90,7 +90,7 @@ js_check:
 eslint:
   stage: review
   script:
-    - eslint -o $LINT_LOG -f junit extensions
+    - eslint -o $LINT_LOG -f junit --resolve-plugins-relative-to $(npm root -g) extensions
   artifacts:
     paths:
       - ${LINT_LOG}
diff --git a/lint/eslintrc-gjs.yml b/lint/eslintrc-gjs.yml
index 13114fa..dadf40b 100644
--- a/lint/eslintrc-gjs.yml
+++ b/lint/eslintrc-gjs.yml
@@ -1,8 +1,12 @@
 ---
 # SPDX-License-Identifier: MIT OR LGPL-2.0-or-later
+# SPDX-FileCopyrightText: 2018 Claudio André <claudioandre br gmail com>
 env:
   es6: true
+  es2020: true
 extends: 'eslint:recommended'
+plugins:
+  - jsdoc
 rules:
   array-bracket-newline:
     - error
@@ -60,6 +64,17 @@ rules:
       - 'CallExpression[callee.object.name=GObject][callee.property.name=registerClass] > 
ClassExpression:first-child'
       # Allow dedenting chained member expressions
       MemberExpression: 'off'
+  jsdoc/check-alignment: error
+  jsdoc/check-param-names: error
+  jsdoc/check-tag-names: error
+  jsdoc/check-types: error
+  jsdoc/implements-on-classes: error
+  jsdoc/newline-after-description: error
+  jsdoc/require-jsdoc: error
+  jsdoc/require-param: error
+  jsdoc/require-param-description: error
+  jsdoc/require-param-name: error
+  jsdoc/require-param-type: error
   key-spacing:
     - error
     - beforeColon: false
@@ -107,8 +122,15 @@ rules:
   no-octal-escape: error
   no-proto: error
   no-prototype-builtins: 'off'
+  no-restricted-globals: [error, window]
   no-restricted-properties:
     - error
+    - object: imports
+      property: format
+      message: Use template strings
+    - object: pkg
+      property: initFormat
+      message: Use template strings
     - object: Lang
       property: copyProperties
       message: Use Object.assign()
@@ -167,6 +189,7 @@ rules:
   object-curly-newline:
     - error
     - consistent: true
+      multiline: true
   object-curly-spacing: error
   object-shorthand: error
   operator-assignment: error
@@ -214,14 +237,14 @@ rules:
   template-curly-spacing: error
   template-tag-spacing: error
   unicode-bom: error
-  valid-jsdoc:
-    - error
-    - requireReturn: false
   wrap-iife:
     - error
     - inside
   yield-star-spacing: error
   yoda: error
+settings:
+  jsdoc:
+    mode: typescript
 globals:
   ARGV: readonly
   Debugger: readonly
@@ -233,5 +256,8 @@ globals:
   logError: readonly
   print: readonly
   printerr: readonly
+  window: readonly
+  TextEncoder: readonly
+  TextDecoder: readonly
 parserOptions:
   ecmaVersion: 2020


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