X-Git-Url: https://git.openstreetmap.org./nominatim-ui.git/blobdiff_plain/65a67281bcf5f1258512b96136920aceb64a8b23..71b589b425178f840ffc1ddf5feb4d24d51f9727:/.eslintrc.json diff --git a/.eslintrc.json b/.eslintrc.json index 7f85a89..a3e191f 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -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 + ] +}