-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.mjs
85 lines (72 loc) · 1.58 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
import globals from "globals";
import tsParser from "@typescript-eslint/parser";
import markdown from "@eslint/markdown";
import json from "@eslint/json";
export default [
{
ignores: ["node_modules/", "dist/"],
}, {
ignores: ["**/*.md", "**/*.json", "**/*.yaml"],
languageOptions: {
globals: {
...globals.jest,
},
parser: tsParser,
ecmaVersion: 6,
sourceType: "module",
parserOptions: {
ecmaFeatures: {
modules: true,
},
},
},
rules: {
"callback-return": "off",
complexity: ["error", {
max: 10,
}],
"eol-last": ["error", "always"],
"indent-legacy": ["error", "tab", {
SwitchCase: 1,
}],
"no-unused-vars": "off",
"no-unreachable": "error",
"no-multiple-empty-lines": ["error", {
max: 1,
}],
"typescript/no-unused-vars": "off",
"typescript/interface-name-prefix": "off",
"typescript/no-explicit-any": "off",
"no-mixed-spaces-and-tabs": "error",
"newline-before-return": "error",
"newline-after-var": ["error", "always"],
"padding-line-between-statements": ["error", {
blankLine: "always",
prev: ["const", "let", "var", "block", "block-like"],
next: ["block", "block-like"],
}],
"prefer-const": "error",
"valid-typeof": "error",
"object-curly-spacing": ["warn", "always"],
"spaced-comment": "off",
},
},
{
files: ["**/*.md"],
plugins: {
markdown
},
processor: "markdown/markdown"
},
{
files: ["**/*.json"],
plugins: {
json
},
language: "json/json",
...json.configs.recommended,
rules: {
"json/no-empty-keys": "off",
},
},
];