-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy path.eslintrc.json
114 lines (114 loc) · 3.45 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
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
{
"settings": {
"react": {
"version": "17.0.2"
},
"import/extensions": [".js", ".jsx", ".ts", ".tsx"],
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"]
},
"import/resolver": {
"node": {
"extensions": [".js", ".jsx", ".ts", ".tsx"]
}
}
},
"env": {
"browser": true,
"es2020": true
},
"extends": [
"react-app",
"react-app/jest",
"airbnb-typescript",
"plugin:@typescript-eslint/recommended",
"plugin:deprecation/recommended",
"prettier",
"plugin:prettier/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 11,
"sourceType": "module",
"project": ["tsconfig.json", "cypress/tsconfig.json"],
"tsconfigRootDir": "./"
},
"plugins": ["@typescript-eslint"],
"ignorePatterns": ["src/constants/locations/*", "supabase/*"],
"rules": {
"react/jsx-uses-react": "off",
"react/react-in-jsx-scope": "off",
"react/jsx-filename-extension": [
1,
{
"extensions": [".js", ".jsx", ".tsx", ".ts"]
}
],
"react/function-component-definition": [2, { "namedComponents": "function-declaration" }],
"react/jsx-props-no-spreading": [0, {}],
"react/forbid-prop-types": [0, {}],
"react/no-danger": [0, {}],
"react/destructuring-assignment": [0, {}],
"array-callback-return": [0, {}],
"consistent-return": [0, {}],
"import/no-extraneous-dependencies": [0, {}],
"sort-imports": ["error", { "ignoreCase": true, "ignoreDeclarationSort": true }],
"import/order": [
1,
{
"groups": [["external", "builtin"], "internal", ["sibling", "parent"], "index"],
"pathGroups": [
{ "pattern": "components", "group": "internal" },
{ "pattern": "components/**", "group": "internal" },
{ "pattern": "constants/**", "group": "internal" },
{ "pattern": "common", "group": "internal" },
{ "pattern": "error/**", "group": "internal" },
{ "pattern": "hooks/**", "group": "internal" },
{ "pattern": "locale/**", "group": "internal" },
{ "pattern": "routes/**", "group": "internal" },
{ "pattern": "selectors", "group": "internal" },
{ "pattern": "store", "group": "internal" },
{ "pattern": "assets/**", "group": "internal", "position": "after" }
],
"pathGroupsExcludedImportTypes": ["internal"],
"alphabetize": {
"order": "asc",
"caseInsensitive": true
}
}
],
"no-param-reassign": [0, {}],
"no-case-declarations": [0, {}],
"no-extra-boolean-cast": [0, {}],
"no-console": ["warn", { "allow": ["warn", "error", "info"] }],
"no-nested-ternary": [0, {}],
"no-debugger": [0, {}],
"react/prop-types": 0,
"react/require-default-props": 0,
"@typescript-eslint/ban-ts-comment": [0, {}],
"@typescript-eslint/ban-types": [0, {}],
"@typescript-eslint/comma-dangle": [
"error",
{
"functions": "never",
"objects": "only-multiline",
"arrays": "only-multiline",
"imports": "only-multiline",
"exports": "only-multiline",
"enums": "only-multiline"
}
],
"jsx-a11y/label-has-associated-control": [
0,
{
"labelComponents": ["label"],
"labelAttributes": ["label"],
"controlComponents": ["Dropdown"],
"depth": 3
}
]
}
}