-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy patheslint.config.js
87 lines (85 loc) · 2.68 KB
/
eslint.config.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
import eslintPluginImportX from "eslint-plugin-import-x";
import eslintPluginJs from "@eslint/js";
import eslintPluginJsonc from "eslint-plugin-jsonc";
import eslintPluginStylistic from "@stylistic/eslint-plugin";
import globals from "globals";
const config = [
eslintPluginJs.configs.all,
eslintPluginImportX.flatConfigs.recommended,
...eslintPluginJsonc.configs["flat/recommended-with-json"],
{
ignores: [
"js/bundle.js",
"package-lock.json",
"rollup.config.js",
"third-party/",
"**/*.min.json",
"data/check_results.json",
"data/overpass.json",
"data/places.json",
"data/places_old.json"
]
},
{
files: ["**/*.js"],
languageOptions: {
ecmaVersion: "latest",
globals: {
...globals.browser,
...globals.node
},
sourceType: "module"
},
plugins: {
...eslintPluginStylistic.configs["recommended-flat"].plugins
},
rules: {
...eslintPluginStylistic.configs["recommended-flat"].rules,
"@stylistic/array-element-newline": ["error", "consistent"],
"@stylistic/comma-dangle": ["error", "never"],
"@stylistic/dot-location": ["error", "property"],
"@stylistic/function-call-argument-newline": ["error", "consistent"],
"@stylistic/function-paren-newline": "off",
"@stylistic/implicit-arrow-linebreak": "off",
"@stylistic/indent": ["error", 2],
"@stylistic/multiline-ternary": "off",
"@stylistic/object-property-newline": "off",
"@stylistic/padded-blocks": ["error", "never"],
"@stylistic/quotes": ["error", "double"],
"@stylistic/semi": ["error", "always"],
"complexity": "off",
"curly": ["error", "multi-line"],
"func-style": "off",
"id-length": ["error", { exceptions: ["i"] }],
"import-x/no-unresolved": ["error", { ignore: ["eslint-plugin-package-json/configs/recommended"] }],
"init-declarations": "off",
"max-depth": ["warn", 5],
"max-lines": ["warn", 500],
"max-lines-per-function": ["warn", 175],
"max-params": ["warn", 5],
"max-statements": "off",
"no-await-in-loop": "off",
"no-console": "off",
"no-inline-comments": "off",
"no-magic-numbers": "off",
"no-param-reassign": "off",
"no-ternary": "off",
"no-undefined": "off",
"no-underscore-dangle": "off",
"no-use-before-define": "off",
"no-warning-comments": "off",
"one-var": "off",
"prefer-destructuring": "off",
"prefer-named-capture-group": "off",
"require-atomic-updates": "off",
"sort-keys": "off"
}
},
{
files: ["**/*.json"],
rules: {
"max-lines": "off"
}
}
];
export default config;