X-Git-Url: https://git.openstreetmap.org./nominatim-ui.git/blobdiff_plain/1df5c38175a3d15f8e595f49506b4dfb46e73d29..93e26bcdb513375933713ad7fad61b30c14dc7ab:/.eslintrc.json?ds=sidebyside diff --git a/.eslintrc.json b/.eslintrc.json index a3e191f..a05265d 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,26 +1,35 @@ +// https://eslint.org/docs/latest/user-guide/configuring/configuration-files { "extends": [ - "airbnb-base/legacy" + "airbnb-base/legacy", + "plugin:mocha/recommended", + "plugin:svelte/recommended" ], - "parser": "espree", + "parserOptions": { + "ecmaVersion": 2019, + "sourceType": "module" + }, "env": { - "browser": true, - "jquery": true + "browser": true }, + "plugins": [ + "svelte", + "mocha" + ], "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 - "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", + "no-use-before-define": ["error", { "functions": false }], "padded-blocks": "off", "no-param-reassign": "off", "max-len": [ @@ -28,16 +37,15 @@ 100, 2, { - "ignoreUrls": true, - "ignoreComments": false + "ignoreUrls": true } ] } }, { - "files": ["handlebar_helpers.js"], + "files": ["test/**"], "globals": { - "get_config_value": true + "browser": true } } ]