]> git.openstreetmap.org Git - nominatim-ui.git/blobdiff - .eslintrc.json
Rebundle latest version
[nominatim-ui.git] / .eslintrc.json
index a3e191f089a29b227b449efe93754de5adfafcde..a05265dc40e4dc63fdc7b27b1560d4926288d659 100644 (file)
@@ -1,26 +1,35 @@
+// https://eslint.org/docs/latest/user-guide/configuring/configuration-files
 {
   "extends": [
 {
   "extends": [
-    "airbnb-base/legacy"
+    "airbnb-base/legacy",
+    "plugin:mocha/recommended",
+    "plugin:svelte/recommended"
   ],
   ],
-  "parser": "espree",
+  "parserOptions": {
+    "ecmaVersion": 2019,
+    "sourceType": "module"
+  },
   "env": {
   "env": {
-    "browser": true,
-    "jquery": true
+    "browser": true
   },
   },
+  "plugins": [
+    "svelte",
+    "mocha"
+  ],
   "overrides": [
     {
       "files": ["*"],
       "globals": {
   "overrides": [
     {
       "files": ["*"],
       "globals": {
-        "Nominatim_Config": true,
-        "Handlebars": true,
-        "L": true // leaflet library
+        "L": true, // leaflet library
+        "Nominatim_Config": true
       },
       "rules": {
         "camelcase": "off", // my_var is fine, no need for myVar
       },
       "rules": {
         "camelcase": "off", // my_var is fine, no need for myVar
-        "func-names": "off", // anonymous 'function()' is fine
+        "func-names": "off", // anonymous "function()" is fine
         "vars-on-top": "off",
         "new-cap": "off", // constructor name can start lowercase (as Leaflet does)
         "no-multiple-empty-lines": "off",
         "vars-on-top": "off",
         "new-cap": "off", // constructor name can start lowercase (as Leaflet does)
         "no-multiple-empty-lines": "off",
+        "no-use-before-define": ["error", { "functions": false }],
         "padded-blocks": "off",
         "no-param-reassign": "off",
         "max-len": [
         "padded-blocks": "off",
         "no-param-reassign": "off",
         "max-len": [
           100,
           2,
           {
           100,
           2,
           {
-            "ignoreUrls": true,
-            "ignoreComments": false
+            "ignoreUrls": true
           }
         ]
       }
     },
     {
           }
         ]
       }
     },
     {
-      "files": ["handlebar_helpers.js"],
+      "files": ["test/**"],
       "globals": {
       "globals": {
-        "get_config_value": true
+        "browser": true
       }
     }
   ]
       }
     }
   ]