-
-
Notifications
You must be signed in to change notification settings - Fork 81
/
.eslintrc.json
120 lines (120 loc) · 2.95 KB
/
.eslintrc.json
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
{
"root": true,
"parser": "@typescript-eslint/parser",
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
// We want to enable this in the long run. For now there are a lot of errors that needs to be handled.
// "plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:import/typescript",
"prettier"
],
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module",
"project": true
},
"plugins": [
"@typescript-eslint",
"unused-imports",
"import",
"unicorn",
"mocha"
],
"rules": {
"import/no-relative-packages": "error",
"@typescript-eslint/consistent-type-imports": "error",
"@typescript-eslint/consistent-type-assertions": [
"error",
{
"assertionStyle": "as"
}
],
"@typescript-eslint/naming-convention": [
"error",
{
"selector": ["objectLiteralProperty"],
"format": ["camelCase"],
"filter": {
"regex": "[.]",
"match": false
}
}
],
"@typescript-eslint/no-floating-promises": "error",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-inferrable-types": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"unused-imports/no-unused-imports": "error",
"@typescript-eslint/no-unused-vars": [
"error",
{
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_",
"caughtErrorsIgnorePattern": "^_",
"ignoreRestSiblings": true
}
],
"curly": "error",
"eqeqeq": [
"error",
"always",
{
"null": "never"
}
],
"no-constant-condition": [
"error",
{
"checkLoops": false
}
],
"no-restricted-syntax": [
"error",
"MemberExpression[object.property.name='constructor'][property.name='name']"
],
"no-throw-literal": "error",
"semi": "off",
"unicorn/prefer-module": "error",
"mocha/no-skipped-tests": "error",
"mocha/no-exclusive-tests": "error"
},
"overrides": [
{
"files": ["*.tsx"],
"rules": {
"@typescript-eslint/naming-convention": [
"error",
{
"selector": ["function"],
"format": ["PascalCase", "camelCase"]
}
]
}
},
{
"files": [
"jest.config.ts",
"docusaurus.config.mts",
"mdx-components.tsx",
"typings/**"
],
"extends": ["plugin:@typescript-eslint/disable-type-checked"]
}
],
"settings": {
"import/resolver": {
"typescript": {
"alwaysTryTypes": true, // always try to resolve types under `<root>@types` directory even it doesn't contain any source code, like `@types/unist`
"project": ["tsconfig.json", "packages/*/tsconfig.json"]
}
}
},
"ignorePatterns": [
"**/generated/**",
"**/out/**",
"**/vendor/**/*.js",
"**/vendor/**/*.ts",
"/data/playground/**"
]
}