-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.js
57 lines (56 loc) · 1.91 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
import antfu from "@antfu/eslint-config";
export default antfu(
{
typescript: {
tsconfigPath: "./tsconfig.json",
parserOptions: {
project: "./tsconfig.json",
},
},
svelte: true,
stylistic: {
indent: 4,
quotes: "double",
semi: true,
overrides: {
"style/brace-style": ["error", "stroustrup", { allowSingleLine: true }],
"style/eol-last": ["error", "always"],
"style/object-curly-spacing": ["error", "always"],
"style/no-multiple-empty-lines": ["error", { "max": 2, "maxEOF": 1, "maxBOF": 1 }],
"style/no-multi-spaces": "off",
"style/no-trailing-spaces": "off",
"style/indent": ["error", 4, { "SwitchCase": 1 }],
"style/new-parens": ["error", "always"],
"style/nonblock-statement-body-position": ["error", "beside"],
},
},
ignores: [
"**/fixtures",
"**/test",
"**/.ref/**/*",
"**/__*",
"node_modules",
"dist",
"**/.factor/**",
".pnpmfile.cjs",
"**/*.json",
],
},
{
files: ["**/*.ts", "**/*.tsx", "**/*.mts"],
rules: {
"no-console": "off",
"unused-imports/no-unused-vars": "off",
"ts/no-for-in-array": "error",
"ts/no-floating-promises": "error",
"ts/consistent-type-imports": "off",
"ts/no-unsafe-assignment": "off",
"ts/no-unsafe-call": "off",
"ts/no-unsafe-member-access": "off",
"ts/no-unsafe-return": "off",
"unicorn/no-object-as-default-parameter": "error",
"ts/consistent-type-definitions": "off",
"ts/strict-boolean-expressions": "off"
},
},
);