forked from Leaflet/Leaflet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
70 lines (70 loc) · 1.44 KB
/
.eslintrc.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/** @type {import('eslint').Linter.Config } */
module.exports = {
ignorePatterns: [
'dist',
'debug',
'docs/docs/highlight',
'docs/examples/choropleth/us-states.js',
'docs/examples/geojson/sample-geojson.js',
'docs/examples/map-panes/eu-countries.js',
'docs/examples/extending/extending-2-layers.md',
'docs/_posts/201*',
'docs/_site',
],
root: true,
globals: {
globalThis: true
},
env: {
commonjs: true,
node: false
},
extends: 'mourner',
plugins: [
'@mapbox/eslint-plugin-script-tags',
'eslint-plugin-import'
],
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module'
},
rules: {
'consistent-return': 'off',
'curly': 'error',
'import/extensions': ['error', 'ignorePackages'],
'indent': ['error', 'tab', {VariableDeclarator: 0, flatTernaryExpressions: true}],
'key-spacing': 'off',
'linebreak-style': ['off', 'unix'],
'no-mixed-spaces-and-tabs': ['error', 'smart-tabs'],
'no-unused-expressions': ['error', {allowShortCircuit: true}],
'spaced-comment': 'error',
'strict': 'off',
'wrap-iife': 'off',
// TODO: Re-enable the rules below and fix the linting issues.
'no-invalid-this': 'off',
'prefer-object-has-own': 'error',
'prefer-spread': 'off'
},
overrides: [
{
files: [
'build/**/*'
],
env: {
node: true
},
rules: {
'global-require': 'off'
}
},
{
files: [
'*.md'
],
rules: {
'eol-last': 'off',
'no-unused-vars': 'off'
}
}
]
};