forked from bycza-zagroda/track-expenses-app-frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
94 lines (94 loc) · 3.94 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
{
"root": true,
"ignorePatterns": ["**/*"],
"plugins": ["@nrwl/nx"],
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {
"@nrwl/nx/enforce-module-boundaries": [
"error",
{
"enforceBuildableLibDependency": true,
"allow": [],
"depConstraints": [
{
"sourceTag": "*",
"onlyDependOnLibsWithTags": ["*"]
}
]
}
]
}
},
{
"files": ["*.ts", "*.tsx"],
"extends": [
"plugin:@nrwl/nx/typescript",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:@typescript-eslint/strict"
],
"rules": {
"comma-dangle": ["warn", "always-multiline"],
"keyword-spacing": ["error", { "after": true, "before": true }],
"eqeqeq": "error",
"space-infix-ops": "error",
"quotes": ["error", "single"],
"@typescript-eslint/explicit-member-accessibility": "warn",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/naming-convention": [
"error",
{ "selector": "variable", "format": ["camelCase", "UPPER_CASE"], "leadingUnderscore": "allow", "trailingUnderscore": "forbid" },
{ "selector": "function", "format": ["camelCase"], "leadingUnderscore": "forbid", "trailingUnderscore": "forbid" },
{ "selector": "parameter", "format": ["camelCase"], "leadingUnderscore": "allow", "trailingUnderscore": "forbid" },
{ "selector": "property", "format": null, "leadingUnderscore": "allow", "trailingUnderscore": "forbid" },
{ "selector": "parameterProperty", "format": ["camelCase"], "leadingUnderscore": "allow", "trailingUnderscore": "forbid" },
{ "selector": "method", "format": ["camelCase"], "leadingUnderscore": "allow", "trailingUnderscore": "forbid" },
{ "selector": "accessor", "format": ["camelCase"], "leadingUnderscore": "allow", "trailingUnderscore": "forbid" },
{ "selector": "enumMember", "format": ["PascalCase"], "leadingUnderscore": "allow", "trailingUnderscore": "forbid" },
{ "selector": "class", "format": ["PascalCase"], "leadingUnderscore": "forbid", "trailingUnderscore": "forbid" },
{ "selector": "interface", "format": ["PascalCase"], "leadingUnderscore": "forbid", "trailingUnderscore": "forbid", "prefix": ["I"] },
{ "selector": "typeAlias", "format": ["PascalCase"], "leadingUnderscore": "forbid", "trailingUnderscore": "forbid", "prefix": ["T"] },
{ "selector": "enum", "format": ["PascalCase"], "leadingUnderscore": "forbid", "trailingUnderscore": "forbid" },
{ "selector": "typeParameter", "format": ["PascalCase"], "leadingUnderscore": "forbid", "trailingUnderscore": "forbid" }
],
"no-multiple-empty-lines": ["error", { "max": 1, "maxEOF": 1, "maxBOF": 1 }],
"@typescript-eslint/unbound-method": "off",
"padded-blocks": ["error", "never"],
"semi": ["error", "always"],
"object-curly-spacing": ["error", "always"],
"array-bracket-spacing": ["error", "always"],
"newline-before-return": "error",
"indent": ["error", 2],
"max-len": ["error", 140],
"padding-line-between-statements": [
"error",
{
"blankLine": "always",
"prev": "*",
"next": "block-like"
},
{
"blankLine": "always",
"prev": "*",
"next": "multiline-expression"
}
],
"@typescript-eslint/explicit-function-return-type": "warn"
}
},
{
"files": ["*.js", "*.jsx"],
"extends": ["plugin:@nrwl/nx/javascript"],
"rules": {}
},
{
"files": ["*.spec.ts", "*.spec.tsx", "*.spec.js", "*.spec.jsx"],
"env": {
"jest": true
},
"rules": {}
}
]
}