]> git.openstreetmap.org Git - nominatim-ui.git/blob - .eslintrc.json
npm package updates
[nominatim-ui.git] / .eslintrc.json
1 // https://eslint.org/docs/latest/user-guide/configuring/configuration-files
2 {
3   "extends": [
4     "airbnb-base/legacy",
5     "plugin:mocha/recommended",
6     "plugin:svelte/recommended"
7   ],
8   "parserOptions": {
9     "ecmaVersion": 2019,
10     "sourceType": "module"
11   },
12   "env": {
13     "browser": true
14   },
15   "plugins": [
16     "svelte",
17     "mocha"
18   ],
19   "overrides": [
20     {
21       "files": ["*"],
22       "globals": {
23         "L": true, // leaflet library
24         "Nominatim_Config": true
25       },
26       "rules": {
27         "camelcase": "off", // my_var is fine, no need for myVar
28         "func-names": "off", // anonymous "function()" is fine
29         "vars-on-top": "off",
30         "new-cap": "off", // constructor name can start lowercase (as Leaflet does)
31         "no-multiple-empty-lines": "off",
32         "no-use-before-define": ["error", { "functions": false }],
33         "padded-blocks": "off",
34         "no-param-reassign": "off",
35         "max-len": [
36           "error",
37           100,
38           2,
39           {
40             "ignoreUrls": true
41           }
42         ]
43       }
44     },
45     {
46       "files": ["test/**"],
47       "globals": {
48         "browser": true
49       }
50     }
51   ]
52 }