-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
162 lines (162 loc) · 5.09 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
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
155
156
157
158
159
160
161
162
{
"root": true,
"ignorePatterns": ["**/*"],
"plugins": ["@nx", "unicorn", "simple-import-sort", "prettier", "react-hooks"],
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {
"@nx/enforce-module-boundaries": [
"error",
{
"enforceBuildableLibDependency": true,
"allow": [],
"depConstraints": [
{
"sourceTag": "type:theme",
"onlyDependOnLibsWithTags": ["type:theme"]
},
{
"sourceTag": "type:utils",
"onlyDependOnLibsWithTags": ["type:theme", "type:utils"]
},
{
"sourceTag": "type:data-access",
"onlyDependOnLibsWithTags": ["type:theme", "type:utils", "type:data-access"]
},
{
"sourceTag": "type:ui",
"onlyDependOnLibsWithTags": ["type:theme", "type:utils", "type:data-access", "type:ui"]
},
{
"sourceTag": "type:feature",
"onlyDependOnLibsWithTags": ["type:theme", "type:utils", "type:data-access", "type:ui", "type:feature"]
},
{
"sourceTag": "type:app",
"onlyDependOnLibsWithTags": ["type:theme", "type:utils", "type:data-access", "type:ui", "type:feature"]
},
{
"sourceTag": "domain:shared",
"onlyDependOnLibsWithTags": ["domain:shared"]
},
{
"sourceTag": "domain:device",
"onlyDependOnLibsWithTags": ["domain:device", "domain:shared"]
}
]
}
],
"@typescript-eslint/explicit-member-accessibility": [
"error",
{
"accessibility": "explicit",
"overrides": {
"accessors": "explicit",
"constructors": "explicit",
"methods": "explicit",
"properties": "explicit",
"parameterProperties": "explicit"
}
}
],
"@typescript-eslint/member-ordering": [
"error",
{
"default": [
"public-static-field",
"protected-static-field",
"private-static-field",
"public-instance-field",
"protected-instance-field",
"private-instance-field",
"public-static-method",
"protected-static-method",
"private-static-method",
"public-constructor",
"protected-constructor",
"private-constructor",
"public-instance-method",
"protected-instance-method",
"private-instance-method"
]
}
],
"@typescript-eslint/naming-convention": [
"error",
{
"selector": "interface",
"format": ["PascalCase"],
"custom": {
"regex": "^I[A-Z]",
"match": true
},
"leadingUnderscore": "forbid",
"trailingUnderscore": "forbid"
},
{
"selector": "typeAlias",
"format": ["PascalCase"],
"custom": {
"regex": "^T[A-Z]",
"match": true
},
"leadingUnderscore": "forbid",
"trailingUnderscore": "forbid"
},
{
"selector": "variable",
"format": ["strictCamelCase", "StrictPascalCase", "UPPER_CASE"],
"leadingUnderscore": "forbid",
"trailingUnderscore": "forbid"
},
{
"selector": "enum",
"format": ["UPPER_CASE"],
"leadingUnderscore": "forbid",
"trailingUnderscore": "forbid"
}
],
"@typescript-eslint/semi": ["error", "always"],
"@typescript-eslint/member-delimiter-style": [
"error",
{
"multiline": {
"delimiter": "semi",
"requireLast": true
},
"singleline": {
"delimiter": "semi",
"requireLast": false
}
}
],
"@typescript-eslint/no-unused-vars": ["warn", { "ignoreRestSiblings": true }],
"no-else-return": "error",
"unicorn/new-for-builtins": "error",
"unicorn/prefer-switch": "error",
"unicorn/string-content": "error",
"unicorn/filename-case": "error",
"react/jsx-no-useless-fragment": "off",
"react-hooks/exhaustive-deps": "error",
"simple-import-sort/imports": "error",
"prettier/prettier": "error"
}
},
{
"files": ["*.ts", "*.tsx"],
"extends": [
"plugin:@nx/typescript",
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended"
],
"rules": {}
},
{
"files": ["*.js", "*.jsx"],
"extends": ["plugin:@nx/javascript"],
"rules": {}
}
]
}