forked from replayio/devtools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
81 lines (81 loc) · 2.3 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
{
"parser": "@typescript-eslint/parser",
"env": {
"browser": true,
"es6": true
},
"extends": ["plugin:react/recommended", "plugin:react-hooks/recommended"],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"ignorePatterns": [
"!.storybook",
"packages/replay-next/playwright/protocol-fixtures/",
"**/*.config.js",
"**/*.json"
],
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 2018,
"project": ["tsconfig.eslint.json"],
"sourceType": "module"
},
"plugins": ["import", "react", "prettier"],
"overrides": [
{
"files": ["{src,packages,pages}/**/*.{js,jsx,ts,tsx}"],
"rules": {
"curly": "error",
"import/prefer-default-export": 0,
"no-nested-ternary": 0,
"no-param-reassign": 0,
"no-restricted-syntax": 0,
"no-restricted-imports": [
"error",
{
"paths": [
{
"name": "react-redux",
"importNames": ["useDispatch", "useSelector"],
"message": "Please import 'useAppDispatch/useAppSelector' from 'ui/setup/hooks' instead."
},
{
"name": "protocol/socket",
"importNames": ["client", "sendMessage", "log"],
"message": "Please use ThreadFront."
},
{
"name": "lodash",
"message": "Please import lodash functions directly."
}
]
}
],
"react/button-has-type": 0,
"react/forbid-prop-types": 0,
"react-hooks/rules-of-hooks": "error", // Checks rules of Hooks
"react-hooks/exhaustive-deps": "error", // Checks effect dependencies
"react/jsx-filename-extension": 0,
"react/jsx-one-expression-per-line": 0,
"react/jsx-props-no-spreading": 0,
"react/no-children-prop": 0,
"react/no-find-dom-node": 0,
"react/no-render-return-value": 0,
"react/no-string-refs": 0,
"react/no-unescaped-entities": 0,
"react/prop-types": 0,
"react/react-in-jsx-scope": 0,
"react/require-default-props": 0,
"sort-vars": "error"
}
}
],
"settings": {
"react": {
"version": "18.1"
}
}
}