-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path.eslintrc
35 lines (35 loc) · 1.24 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
{
"extends": "@gravity-ui/eslint-config/client",
"rules": {
"react/jsx-uses-react": "off",
"react/react-in-jsx-scope": "off",
"valid-jsdoc": "off",
"react/jsx-fragments": ["error", "element"],
"no-restricted-syntax": [
"error",
{
"selector": "ImportDeclaration[source.value='react'] :matches(ImportNamespaceSpecifier, ImportSpecifier)",
"message": "Please use import React from 'react' instead.",
},
{
"selector": "TSTypeReference>TSQualifiedName[left.name='React'][right.name='FC']",
"message": "Don't use React.FC",
},
{
"selector": "ImportDeclaration[source.value='axios'] :matches(ImportSpecifier[imported.name='isAxiosError'])",
"message": "Please use isAxiosError from utils/response instead of axios",
},
],
"no-restricted-imports": [
"error",
{
"patterns": [
{
"group": [".*/**/lib"],
"message": "Please use direct imports instead",
},
],
},
],
},
}