-
Notifications
You must be signed in to change notification settings - Fork 40
/
.eslintrc
154 lines (153 loc) · 4.07 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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
{
"env": {
"browser": true,
"es6": true,
"amd": true
},
"extends": [
"airbnb",
"eslint:recommended",
"plugin:prettier/recommended",
"plugin:react/recommended",
"plugin:react/jsx-runtime",
"plugin:react-hooks/recommended",
"plugin:@typescript-eslint/recommended",
"plugin:import/recommended",
"plugin:import/typescript"
],
"root": true,
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 6,
"ecmaFeatures": {
"jsx": true
},
"sourceType": "module"
},
"plugins": [
"prettier",
"react",
"typescript",
"@typescript-eslint",
"import",
"unused-imports"
],
"globals": {
"expect": true,
"FileReader": true,
"cyblog": "readonly"
},
"rules": {
"valid-jsdoc": "off",
"no-shadow": "off",
"react/require-default-props": "off", // typescript types using
"react/destructuring-assignment": "off",
"prettier/prettier": "error",
"linebreak-style": ["error", "unix"],
"react/no-array-index-key": "off",
"react/react-in-jsx-scope": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-non-null-assertion": "off",
// "@typescript-eslint/no-var-requires": "off",
// "@typescript-eslint/no-unused-vars": "off",
"unused-imports/no-unused-imports": "error",
"unused-imports/no-unused-vars": [
"error",
{ "vars": "all", "args": "none", "ignoreRestSiblings": false }
],
"default-param-last": "off",
"react/prop-types": "off",
"no-console": "off",
"no-nested-ternary": "off",
"curly": ["warn", "all"],
"no-alert": "warn",
"no-debugger": "warn",
"no-param-reassign": [
"error",
// redux toolkit state
{ "ignorePropertyModificationsFor": ["state"] }
],
"no-duplicate-imports": [
"warn",
{
"includeExports": true
}
],
"object-curly-spacing": ["warn", "always"],
"object-property-newline": 0,
"one-var-declaration-per-line": ["warn", "always"],
"no-use-before-define": ["error", { "variables": false }],
"no-plusplus": ["off"],
"padded-blocks": [
"warn",
{
"blocks": "never",
"classes": "never",
"switches": "never"
}
],
"react/jsx-closing-bracket-location": "warn",
"react/jsx-indent-props": [2, 2],
"react/jsx-props-no-spreading": "off",
"import/no-extraneous-dependencies": ["error", { "devDependencies": true }],
"jsx-a11y/no-noninteractive-element-interactions": [
"error",
{
"handlers": [
"onClick",
"onMouseDown",
"onMouseUp",
"onKeyPress",
"onKeyDown",
"onKeyUp"
]
}
],
"no-restricted-imports": "off",
"@typescript-eslint/no-restricted-imports": [
"warn",
{
"name": "react-redux",
"importNames": ["useSelector", "useDispatch"],
"message": "Use typed hooks `useAppDispatch` and `useAppSelector` instead."
},
{
"name": "@cybercongress/gravity",
"message": "Lib is deprecated"
}
],
"react/jsx-filename-extension": "off",
"react/tsx-filename-extension": "off",
"import/no-unused-modules": [1],
"import/extensions": [
"off",
"always",
{ "ts": "never", "tsx": "never", "jsx": "never", "js": "never" }
],
"no-unused-expressions": [
"error",
{ "allowShortCircuit": true, "allowTernary": true }
],
"no-underscore-dangle": "off",
"import/no-unresolved": "off"
},
"settings": {
"import/resolver": {
"typescript": {
"alwaysTryTypes": true,
"directory": "./",
"project": "./tsconfig.json"
}
// "alias": {
// "map": [
// // ["components", "./src/components"],
// // ["images", "./src/image"]
// ["src", "./src/"]
// ],
// "extensions": [".ts", ".tsx", ".js", ".jsx", ".png"]
// }
}
}
}