-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc
109 lines (109 loc) · 2.81 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
{
"root": true,
"extends": [
"plugin:import/recommended",
"plugin:import/typescript",
"plugin:unicorn/recommended",
"airbnb",
"airbnb-typescript",
"airbnb/hooks",
"prettier"
],
"plugins": ["jsdoc", "storybook", "testing-library"],
"parserOptions": {
"project": "./tsconfig.json"
},
"reportUnusedDisableDirectives": true,
"rules": {
"consistent-return": "off",
"no-console": [
"error",
{
"allow": ["warn", "error"]
}
],
"no-continue": "off",
"no-nested-ternary": "off",
"no-param-reassign": [
"error",
{
"props": true,
"ignorePropertyModificationsFor": [
"acc", // for reduce accumulators
"accumulator", // for reduce accumulators
"e", // for e.nativeEvent
"event", // for event.nativeEvent
"ctx", // for Next.js
"context", // for Next.js
"req", // for Express requests
"request", // for Express requests
"res", // for Express responses
"response" // for Express responses
]
}
],
"no-restricted-syntax": "off",
"no-underscore-dangle": [
"error",
{
"allow": ["__DEV__", "_raw", "_value"]
}
],
"import/prefer-default-export": "off",
"jsdoc/multiline-blocks": [
"error",
{
"noSingleLineBlocks": true,
"singleLineTags": ["default", "ignore", "platform"]
}
],
"react/function-component-definition": [
"error",
{
"namedComponents": "arrow-function",
"unnamedComponents": "arrow-function"
}
],
"react/jsx-props-no-spreading": "off",
"react/prop-types": "off",
"react/react-in-jsx-scope": "off",
"react/require-default-props": "off",
"react/sort-prop-types": "error",
"@typescript-eslint/array-type": "error",
"@typescript-eslint/ban-types": [
"error",
{
"types": {
"{}": false
},
"extendDefaults": true
}
],
"@typescript-eslint/consistent-type-definitions": ["error", "interface"],
"@typescript-eslint/prefer-regexp-exec": "error",
"unicorn/no-negated-condition": "off",
"unicorn/no-array-reduce": "off",
"unicorn/no-null": "off",
"unicorn/prefer-module": "off",
"unicorn/prefer-spread": "off",
"unicorn/prefer-top-level-await": "off",
"unicorn/prevent-abbreviations": "off"
},
"overrides": [
{
"files": ["*.stories.tsx"],
"extends": ["plugin:storybook/recommended"],
"rules": {
"import/no-extraneous-dependencies": "off",
"react-hooks/rules-of-hooks": "off" // CSF3
}
},
{
"files": ["*.test.tsx"],
"extends": ["plugin:testing-library/react"],
"rules": {
"import/no-extraneous-dependencies": "off"
}
}
]
}