forked from Kaetram/Kaetram-Open
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc
132 lines (123 loc) · 4.63 KB
/
.eslintrc
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
{
"root": true,
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
// "plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:@typescript-eslint/strict",
"plugin:import/recommended",
"plugin:import/typescript",
"plugin:unicorn/recommended",
"plugin:prettier/recommended",
"plugin:astro/recommended",
"plugin:astro/jsx-a11y-strict"
],
"plugins": ["prefer-let"],
"parserOptions": {
"project": "tsconfig.json"
},
"rules": {
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-dynamic-delete": "off",
"@typescript-eslint/prefer-nullish-coalescing": "off",
"@typescript-eslint/no-restricted-imports": [
"warn",
{
"patterns": [
{
"group": ["*//", "*/.", "./..", "*.d"],
"message": "Redundant import pattern"
},
{
"group": [
"**/../../app",
"**/../../client",
"**/../../server",
"**/../../common",
"**/../../e2e",
"**/../../hub",
"**/../../tools"
],
"message": "Import from '@kaetram'"
}
]
}
],
"@typescript-eslint/consistent-indexed-object-style": ["warn", "index-signature"],
"@typescript-eslint/consistent-type-exports": "warn",
"@typescript-eslint/consistent-type-imports": "warn",
"@typescript-eslint/explicit-member-accessibility": "warn",
"@typescript-eslint/method-signature-style": ["warn", "method"],
"@typescript-eslint/prefer-regexp-exec": "warn",
"@typescript-eslint/no-redundant-type-constituents": "warn",
// REVIEW: Consider if we need certain undefined/null checks
"@typescript-eslint/no-unnecessary-condition": "off",
"@typescript-eslint/no-unnecessary-type-assertion": "off",
"@typescript-eslint/no-unnecessary-qualifier": "warn",
"@typescript-eslint/no-unused-vars": ["warn", { "argsIgnorePattern": "^_" }],
"import/no-unresolved": "off",
"import/no-named-as-default-member": "off",
"import/order": [
"warn",
{
"groups": [
"builtin",
"sibling",
"parent",
"index",
"external",
"internal",
"unknown",
"object",
"type"
],
"newlines-between": "always"
}
],
// TODO: Enable on ESM
"unicorn/prefer-module": "off",
"unicorn/prefer-top-level-await": "off",
"unicorn/no-null": "off",
"unicorn/no-array-reduce": "off",
"unicorn/prefer-number-properties": "off",
"unicorn/prevent-abbreviations": "off",
"unicorn/prefer-math-trunc": "off",
// TODO: Enable on ES2022
"unicorn/prefer-string-replace-all": "off",
"prettier/prettier": "warn",
"prefer-let/prefer-let": "error",
"no-fallthrough": "off",
"prefer-const": "off",
// NOTE: Enable on ES2022
"prefer-object-has-own": "off",
"prefer-template": "warn",
"no-constant-binary-expression": "warn",
"curly": ["warn", "multi"],
"one-var": ["warn", "consecutive"],
"yoda": "warn",
"no-else-return": "warn",
"object-shorthand": "warn",
"operator-assignment": "warn",
"prefer-destructuring": ["warn", { "object": true, "array": true }],
"array-callback-return": "error",
"default-case-last": "error",
"dot-notation": "error",
"eqeqeq": "error",
"max-classes-per-file": "error",
"no-useless-backreference": "error",
"no-unsafe-optional-chaining": "error",
"no-unreachable-loop": "error",
"no-template-curly-in-string": "error",
"no-promise-executor-return": "error",
"no-prototype-builtins": "error",
"no-div-regex": "error",
"no-regex-spaces": "error",
"no-control-regex": "error",
"no-eval": "error",
"no-extend-native": "error",
"no-implied-eval": "error",
"no-iterator": "error",
"no-labels": "error"
},
"ignorePatterns": ["node_modules", "dist"]
}