[gjs: 1/7] CI: Tweak eslint configuration



commit 6247f562e8f1bb7f197414bf7373526b88d2ea40
Author: Philip Chimento <philip chimento gmail com>
Date:   Tue Mar 20 00:52:43 2018 -0700

    CI: Tweak eslint configuration
    
    This adds some more customizations for some subdirectories, and tweaks a
    couple of rules.

 .eslintignore                                       |  1 +
 .eslintrc.json                                      | 20 ++++++++++++++------
 installed-tests/js/.eslintrc.json                   | 11 +++++++++++
 installed-tests/js/modules/overrides/.eslintrc.json | 10 ++++++++++
 4 files changed, 36 insertions(+), 6 deletions(-)
---
diff --git a/.eslintignore b/.eslintignore
index 2949f27..4e40cb0 100644
--- a/.eslintignore
+++ b/.eslintignore
@@ -1,2 +1,3 @@
 installed-tests/js/jasmine.js
+installed-tests/js/modules/overrides/WarnLib.js
 modules/jsUnit.js
diff --git a/.eslintrc.json b/.eslintrc.json
index 8cade1c..bdcd00d 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -1,7 +1,6 @@
 {
     "env": {
-        "es6": true,
-        "jasmine": true
+        "es6": true
     },
     "extends": "eslint:recommended",
     "rules": {
@@ -16,6 +15,12 @@
             "error",
             "unix"
         ],
+        "no-empty": [
+            "error",
+            {
+                "allowEmptyCatch": true
+            }
+        ],
         "quotes": [
             "error",
             "single",
@@ -29,13 +34,16 @@
         ]
     },
     "globals": {
-        "imports": false,
         "ARGV": false,
+        "Debugger": false,
+        "GIRepositoryGType": false,
+        "imports": false,
+        "Intl": false,
+        "log": false,
+        "logError": false,
         "print": false,
         "printerr": false,
-        "window": false,
-        "log": false,
-        "logError": false
+        "window": false
     },
     "parserOptions": {
         "ecmaVersion": 2017
diff --git a/installed-tests/js/.eslintrc.json b/installed-tests/js/.eslintrc.json
new file mode 100644
index 0000000..8bd2479
--- /dev/null
+++ b/installed-tests/js/.eslintrc.json
@@ -0,0 +1,11 @@
+{
+    "env": {
+        "jasmine": true
+    },
+    "globals": {
+        "clearInterval": false,
+        "clearTimeout": false,
+        "setInterval": false,
+        "setTimeout": false
+    }
+}
\ No newline at end of file
diff --git a/installed-tests/js/modules/overrides/.eslintrc.json 
b/installed-tests/js/modules/overrides/.eslintrc.json
new file mode 100644
index 0000000..eecae92
--- /dev/null
+++ b/installed-tests/js/modules/overrides/.eslintrc.json
@@ -0,0 +1,10 @@
+{
+    "rules": {
+        "no-unused-vars": [
+            "error",
+            {
+                "varsIgnorePattern": "^_init$"
+            }
+        ]
+    }
+}


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