]> git.openstreetmap.org Git - nominatim-ui.git/blob - .eslintrc.js
version 3.0.0
[nominatim-ui.git] / .eslintrc.js
1 module.exports = {
2   extends: [
3     'airbnb-base/legacy'
4   ],
5   parserOptions: {
6     ecmaVersion: 2019,
7     sourceType: 'module'
8   },
9   env: {
10     browser: true,
11     jquery: true
12   },
13   plugins: [
14     'svelte3'
15   ],
16   overrides: [
17     {
18       files: ['*'],
19       globals: {
20         L: true, // leaflet library
21         Nominatim_Config: true
22       },
23       rules: {
24         camelcase: 'off', // my_var is fine, no need for myVar
25         'func-names': 'off', // anonymous 'function()' is fine
26         'vars-on-top': 'off',
27         'new-cap': 'off', // constructor name can start lowercase (as Leaflet does)
28         'no-multiple-empty-lines': 'off',
29         'no-use-before-define': ['error', { functions: false }],
30         'padded-blocks': 'off',
31         'no-param-reassign': 'off',
32         'max-len': [
33           'error',
34           100,
35           2,
36           {
37             ignoreUrls: true,
38             ignoreComments: false
39           }
40         ]
41       }
42     },
43     {
44       files: ['*.svelte'],
45       processor: 'svelte3/svelte3',
46       rules: {
47         'no-label-var': 'off' // eslint thinks $: (https://svelte.dev/tutorial/reactive-statements) are labels
48       }
49     }
50   ]
51 };