forked from raywo/MMM-PublicTransportHafas
-
Notifications
You must be signed in to change notification settings - Fork 6
/
eslint.config.mjs
107 lines (105 loc) · 3.11 KB
/
eslint.config.mjs
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
import eslintPluginImport from "eslint-plugin-import";
import eslintPluginJs from "@eslint/js";
import eslintPluginJson from "@eslint/json";
import eslintPluginMarkdown from "@eslint/markdown";
import eslintPluginStylistic from "@stylistic/eslint-plugin";
import globals from "globals";
const config = [
eslintPluginImport.flatConfigs.recommended,
eslintPluginJs.configs.all,
...eslintPluginMarkdown.configs.recommended,
{
"files": ["**/*.md"],
"language": "markdown/gfm",
"plugins": {
eslintPluginMarkdown
},
"rules": {
"logical-assignment-operators": "off",
"markdown/no-missing-label-refs": "off",
"max-lines-per-function": "off",
"no-irregular-whitespace": "off"
}
},
{
"files": ["**/*.json"],
"ignores": ["package-lock.json"],
"language": "json/json",
...eslintPluginJson.configs.recommended,
"rules": {
"logical-assignment-operators": "off",
"max-lines-per-function": "off",
"no-irregular-whitespace": "off"
}
},
{
"files": ["**/*.js"],
"languageOptions": {
"ecmaVersion": "latest",
"globals": {
...globals.browser,
...globals.node
},
"sourceType": "commonjs"
},
"plugins": {
...eslintPluginStylistic.configs["all-flat"].plugins
},
"rules": {
...eslintPluginStylistic.configs["all-flat"].rules,
"@stylistic/array-element-newline": ["error", "consistent"],
"@stylistic/dot-location": ["error", "property"],
"@stylistic/function-call-argument-newline": ["error", "consistent"],
"@stylistic/indent": ["error", 2],
"@stylistic/lines-around-comment": "off",
"@stylistic/multiline-comment-style": "off",
"@stylistic/object-property-newline": "off",
"@stylistic/padded-blocks": ["error", "never"],
"@stylistic/quote-props": ["error", "as-needed"],
"capitalized-comments": "off",
"consistent-this": "off",
"default-case": "off",
"func-style": "off",
"init-declarations": "off",
"line-comment-position": "off",
"max-lines": "off",
"max-lines-per-function": ["error", 100],
"max-params": "off",
"max-statements": ["error", 25],
"multiline-comment-style": "off",
"no-await-in-loop": "off",
"no-inline-comments": "off",
"no-magic-numbers": "off",
"no-ternary": "off",
"no-undef": "warn",
"one-var": "off",
"sort-keys": "off",
"strict": "off"
}
},
{
"files": ["**/*.mjs"],
"languageOptions": {
"ecmaVersion": "latest",
"globals": {
...globals.node
},
"sourceType": "module"
},
"plugins": {
...eslintPluginStylistic.configs["all-flat"].plugins
},
"rules": {
...eslintPluginStylistic.configs["all-flat"].rules,
"@stylistic/array-element-newline": "off",
"@stylistic/indent": ["error", 2],
"@stylistic/padded-blocks": ["error", "never"],
"func-style": "off",
"max-lines-per-function": ["error", 100],
"no-magic-numbers": "off",
"one-var": "off",
"prefer-destructuring": "off"
}
}
];
export default config;