]> git.openstreetmap.org Git - nominatim-ui.git/blobdiff - .eslintrc.json
Nominatim github organization name changed. Add github link for this frontend as...
[nominatim-ui.git] / .eslintrc.json
index 7f85a89f4b5a4bcde3aa39995ff044f82507fb1a..a3e191f089a29b227b449efe93754de5adfafcde 100644 (file)
@@ -1,28 +1,44 @@
 {
-    "env": {
-        "browser": true,
-        // "es6": true,
-        "jquery": true
-    },
-    "extends": [
-        "airbnb-base"
-    ],
-    "globals": {
-        "jQuery": true,
+  "extends": [
+    "airbnb-base/legacy"
+  ],
+  "parser": "espree",
+  "env": {
+    "browser": true,
+    "jquery": true
+  },
+  "overrides": [
+    {
+      "files": ["*"],
+      "globals": {
+        "Nominatim_Config": true,
         "Handlebars": true,
-        "L": true // Leaflet
-    },
-    "parserOptions": {
-        "ecmaVersion": 2018
-    },
-    "rules": {
-        "camelcase": "off", // abd_def is fine
-        "vars-on-top": "off",
-        "comma-dangle": "off", // no comman after last item in list needed
+        "L": true // leaflet library
+      },
+      "rules": {
+        "camelcase": "off", // my_var is fine, no need for myVar
         "func-names": "off", // anonymous 'function()' is fine
-        "object-shorthand": "off",
-        "prefer-arrow-callback": "off",
-        "prefer-template": "off", // don't require emplates
-        "no-var": "off" // don't require let/const
+        "vars-on-top": "off",
+        "new-cap": "off", // constructor name can start lowercase (as Leaflet does)
+        "no-multiple-empty-lines": "off",
+        "padded-blocks": "off",
+        "no-param-reassign": "off",
+        "max-len": [
+          "error",
+          100,
+          2,
+          {
+            "ignoreUrls": true,
+            "ignoreComments": false
+          }
+        ]
+      }
+    },
+    {
+      "files": ["handlebar_helpers.js"],
+      "globals": {
+        "get_config_value": true
+      }
     }
-}
\ No newline at end of file
+  ]
+}