forked from apollographql/apollo-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc
83 lines (83 loc) · 2.35 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
{
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint", "import", "local-rules"],
"env": {
"browser": true,
"node": true,
"es2021": true
},
"parserOptions": {
"ecmaVersion": "latest"
},
"settings": {
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"]
},
"import/resolver": {
"typescript": {
"alwaysTryTypes": true
}
}
},
"overrides": [
{
"files": ["**/*.ts", "**/*.tsx"],
"excludedFiles": ["**/__tests__/**/*.*", "*.d.ts"],
"extends": ["plugin:react-hooks/recommended"],
"parserOptions": {
"project": "./tsconfig.json"
},
"plugins": ["eslint-plugin-react-compiler"],
"rules": {
"react-compiler/react-compiler": "error",
"@typescript-eslint/consistent-type-imports": [
"error",
{
"prefer": "type-imports",
"disallowTypeAnnotations": false,
"fixStyle": "separate-type-imports"
}
],
"@typescript-eslint/consistent-type-exports": ["error"],
"@typescript-eslint/no-import-type-side-effects": "error",
"no-restricted-syntax": [
"error",
{
"selector": "ImportDeclaration[source.value='react'][importKind!='type'] :matches(ImportSpecifier, ImportDefaultSpecifier)",
"message": "Please only use the namespace import syntax (`import * as React from 'react'`) for React imports!"
}
],
"import/consistent-type-specifier-style": ["error", "prefer-top-level"],
"import/extensions": [
"error",
"always",
{
"ignorePackages": true,
"checkTypeImports": true
}
],
"local-rules/require-using-disposable": "error"
}
},
{
"files": [
"**/__tests__/**/*.[jt]s",
"**/__tests__/**/*.[jt]sx",
"**/?(*.)+(test).[jt]s",
"**/?(*.)+(test).[jt]sx"
],
"extends": ["plugin:testing-library/react"],
"parserOptions": {
"project": "./tsconfig.tests.json"
},
"rules": {
"testing-library/prefer-user-event": "error",
"testing-library/no-wait-for-multiple-assertions": "off",
"local-rules/require-using-disposable": "error"
}
}
],
"rules": {
"import/no-unresolved": "error"
}
}