-
Notifications
You must be signed in to change notification settings - Fork 3
/
eslint.config.js
78 lines (76 loc) · 2.29 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
import tsEslint from "typescript-eslint";
import eslint from "@eslint/js";
import prettier from "eslint-config-prettier";
import simpleImportSort from "eslint-plugin-simple-import-sort";
import eslintPluginN from "eslint-plugin-n";
const ignoreFiles = [
"**/*.json",
"*.json",
"node_modules",
"**/node_modules",
"**/.arri",
"**/.output",
"**/build",
"**/target",
"dist",
"**/dist",
"**/*.js",
"**/**/dist/*.d.ts",
"**/*.dart",
"**/*.kt",
"**/*.rs",
"**/*.zig",
"**/*.swift",
"**/*.go",
"**/*.py",
"tests/server",
];
export default tsEslint.config(
{
ignores: ignoreFiles,
},
eslint.configs.recommended,
...tsEslint.configs.recommended,
eslintPluginN.configs["flat/recommended"],
{
plugins: {
"simple-import-sort": simpleImportSort,
},
rules: {
"simple-import-sort/imports": 2,
"simple-import-sort/exports": 2,
"n/no-unpublished-import": 0,
"n/no-missing-import": 0,
"n/no-extraneous-import": 0,
"n/no-process-exit": 0,
"n/hashbang": 0,
"n/no-unsupported-features/node-builtins": 0,
"@typescript-eslint/no-non-null-assertion": 0,
"@typescript-eslint/non-nullable-type-assertion-style": 0,
"@typescript-eslint/triple-slash-reference": 0,
"@typescript-eslint/strict-boolean-expressions": 0,
"@typescript-eslint/promise-function-async": 0,
"@typescript-eslint/no-misused-promises": 0,
"@typescript-eslint/explicit-function-return-type": 0,
"@typescript-eslint/no-redeclare": 0,
"@typescript-eslint/return-await": 0,
"@typescript-eslint/array-type": 0,
"@typescript-eslint/no-explicit-any": 0,
"@typescript-eslint/no-unused-vars": [
2,
{
varsIgnorePattern: "^_",
caughtErrorsIgnorePattern: "^_",
argsIgnorePattern: "^_",
},
],
},
},
{
files: ["languages/ts/ts-server/**/*.ts", "tooling/schema/**/*.ts"],
rules: {
"@typescript-eslint/no-unsafe-argument": 0,
},
},
prettier,
);