-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc
127 lines (124 loc) · 3.54 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
{
"env": {
"browser": true,
"es2021": true
},
"extends": [
"standard",
"plugin:react/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 12,
"sourceType": "module"
},
"plugins": [
"@typescript-eslint",
"react",
"react-hooks",
"simple-import-sort",
"import",
"unused-imports"
],
"settings": {
"react": { "version": "detect" }
},
"globals": { "JSX": true },
"rules": {
"max-len": ["warn", {
"code": 120,
"comments": 120,
"ignoreUrls": true,
"ignoreStrings": true,
"ignoreTemplateLiterals": true,
"ignoreRegExpLiterals": true,
"ignorePattern": "\\s*\"[A-Z_0-9]+\": \".*\",?"
}],
"no-console": ["warn", {
"allow": ["warn", "error"]
}],
"padded-blocks": "warn",
"no-trailing-spaces": "warn",
"object-curly-spacing": "warn",
"no-multiple-empty-lines": ["warn", { "max": 1, "maxEOF": 0 }],
"eol-last": "warn",
"multiline-ternary":"warn",
"no-case-declarations": "off",
"indent": "off",
"semi": ["warn", "always"],
"quotes": ["warn", "single"],
"space-before-function-paren": ["warn", "always"],
"comma-dangle": "off",
"no-unused-vars": "off",
"object-curly-newline": ["warn", {
"ObjectPattern": { "multiline": true },
"ImportDeclaration": { "multiline": true }
}],
"node/handle-callback-err": "off",
"@typescript-eslint/indent": ["warn", 2, {
"SwitchCase": 1,
"ignoredNodes": ["TaggedTemplateExpression *"]
}],
"@typescript-eslint/no-unused-vars": ["warn", {
"argsIgnorePattern": "^_$"
}],
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/semi": ["warn", "always"],
"@typescript-eslint/member-delimiter-style": ["warn", {
"multiline": {
"delimiter": "semi",
"requireLast": true
},
"singleline": {
"delimiter": "semi",
"requireLast": false
}
}],
"react/no-unescaped-entities": "off",
"react/prop-types": "off",
"react/display-name": "off",
"react/hook-use-state": "warn",
"generator-star-spacing": ["warn", "after"],
"yield-star-spacing": ["warn", "after"],
"jsx-quotes": ["warn", "prefer-double"],
"react/jsx-closing-bracket-location": ["warn", "line-aligned"],
"react/jsx-equals-spacing": ["warn", "never"],
"react/jsx-first-prop-new-line": ["warn", "multiline"],
"react/jsx-fragments": ["warn", "syntax"],
"react/jsx-indent": ["warn", 2],
"react/jsx-max-props-per-line": ["warn", {
"maximum": { "single": 2, "multi": 1 }
}],
"react/jsx-sort-props": ["warn", {
"callbacksLast": true,
"shorthandFirst": true,
"noSortAlphabetically": true,
"reservedFirst": true
}],
"react/jsx-uses-react": "off",
"react/react-in-jsx-scope": "off",
"import/first": "warn",
"import/newline-after-import": "warn",
"import/no-duplicates": "warn",
"unused-imports/no-unused-imports": "warn",
"simple-import-sort/exports": "warn",
"simple-import-sort/imports": ["warn", {
"groups": [
["^react"],
["^@?\\w"],
["^(pages|components|navigation|ui|assets)(/.*|$)"],
["^hooks(/.*|$)"],
// Parent imports (`../*`)
["^\\.\\.(?!/?$)", "^\\.\\./?$"],
// Relative imports (`./*`)
["^\\./(?=.*/)(?!/?$)", "^\\.(?!/?$)", "^\\./?$"],
["^store(/.*|$)"],
["^contracts(/.*|$)"],
["^(constants|utils)(/.*|$)"]
]
}]
}
}