-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.eslintrc
114 lines (114 loc) · 3.88 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
{
"root": true,
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.json"
},
"plugins": [
"@typescript-eslint",
"effector"
],
"env": {
"jest": true,
"browser": true,
"commonjs": true,
"es6": true,
"node": true
},
"settings": {
"import/resolver": {
"node": {
"extensions": [
".js",
".jsx",
".ts",
".tsx"
],
"moduleDirectory": [
"node_modules",
"src"
]
}
},
"react": {
"version": "detect"
}
},
"extends": [
"airbnb",
"airbnb-typescript",
"airbnb/hooks",
"plugin:prettier/recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
// Recommended to be added last after all other "recommended" tools - See https://nextjs.org/docs/basic-features/eslint#disabling-rules
"plugin:@next/next/recommended",
// Enforce stronger rules for Core Web Vitals - See https://nextjs.org/docs/basic-features/eslint#core-web-vitals
// "next/core-web-vitals"
"plugin:effector/recommended",
"plugin:effector/scope",
"plugin:effector/react",
"plugin:effector/future",
"plugin:effector/patronum"
],
"rules": {
"no-underscore-dangle": "off",
"@typescript-eslint/no-misused-promises": "off",
"react/function-component-definition": [
2,
{
"namedComponents": "arrow-function",
"unnamedComponents": "arrow-function"
}
],
// Disable line length checks, because the IDE is already configured to warn about it, and it's a waste of time to check for lines that are too long, especially in comments (like this one!)
"max-len": "off",
// Disabled, already handled by @typescript-eslint/no-unused-vars
"no-unused-vars": 0,
// @see https://ru.reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html
"react/react-in-jsx-scope": "off",
// Don't enforce, let developer choose
"react/jsx-props-no-spreading": "off",
// Not using "noreferrer" is not a security risk, but "noopener" should always be used indeed
"react/jsx-no-target-blank": "warn",
// Should be handled with TS instead
"react/prop-types": "off",
// ts-ignore are sometimes the only way to bypass a TS issue, we trust we will use them for good and not abuse them
"@typescript-eslint/ban-ts-comment": "warn",
"@typescript-eslint/no-unsafe-assignment": "off",
"import/extensions": "off",
// When there is only a single export from a module, don't enforce a default export, but rather let developer choose what's best
"import/prefer-default-export": "off",
// Don't enforce, let developer choose. Sometimes we like to specifically use "return" for the sake of comprehensibility and avoid ambiguity
"no-else-return": 0,
// Don't enforce, let developer choose. Sometimes we like to specifically use "return" for ease of debugging and printing
"arrow-body-style": 0,
// Don't enforce, let developer choose
"react-hooks/exhaustive-deps": "warn",
// Don't enforce, let developer choose
"react/jsx-one-expression-per-line": "off",
// Don't enforce, let developer choose
"@typescript-eslint/no-floating-promises": "warn",
"react/require-default-props": "off",
// Too restrictive rule
"@typescript-eslint/no-unsafe-call": "warn",
// Too restrictive rule
"@typescript-eslint/no-unsafe-return": "warn",
// Too restrictive rule
"@typescript-eslint/no-unsafe-member-access": "warn",
// Too restrictive rule
"@typescript-eslint/restrict-template-expressions": "warn",
"import/no-extraneous-dependencies": [
"error",
{
"devDependencies": [
"**/*.test.ts",
"**/*.test.tsx",
"**/*.spec.ts",
"**/*.spec.tsx",
"**/*.stories.tsx"
]
}
]
}
}