-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
110 lines (108 loc) · 2.85 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
{
"root": true,
"parser": "@typescript-eslint/parser",
"extends": [
"@react-native-community",
"plugin:import/errors",
"plugin:import/typescript",
"prettier/@typescript-eslint",
"plugin:prettier/recommended"
],
"plugins": [
"unicorn"
],
"settings": {
"import/resolver": {
"alias": {
"map": [
["~", "./lib"],
["#", "./test"]
],
"extensions": [".ts", ".tsx", ".json"]
}
}
},
"rules": {
// Bug avoiding
"import/no-cycle": "error",
"eslint-comments/no-unused-disable": "error",
"@typescript-eslint/explicit-function-return-type": "error",
"no-template-curly-in-string": ["error"],
"nonblock-statement-body-position": ["error"],
// Code style
"unicorn/filename-case": [
"error",
{
"case": "kebabCase"
}
],
"padding-line-between-statements": [
"error",
{
"blankLine": "always",
"prev": "*",
"next": "block-like"
},
{
"blankLine": "always",
"prev": "block-like",
"next": "*"
}
],
"no-else-return": ["error"],
"no-var": ["error"],
"no-multi-spaces": ["error"],
"no-sequences": ["error"],
"no-useless-call": ["error"],
"no-useless-concat": ["error"],
"no-useless-return": ["error"],
"no-void": ["error"],
"no-multi-assign": ["error"],
"no-multiple-empty-lines": ["error", { "max": 1 }],
"no-negated-condition": ["error"],
"array-bracket-newline": ["error", "consistent"],
"eol-last": ["error", "always"],
"keyword-spacing": ["error"],
"no-nested-ternary": ["error"],
"no-tabs": ["error"],
"no-trailing-spaces": ["error"],
"no-unneeded-ternary": ["error"],
"no-whitespace-before-property": ["error"],
"object-curly-newline": ["error", {
"consistent": true
}],
"no-confusing-arrow": ["error"],
"padded-blocks": ["error", "never"],
"no-useless-computed-key": ["error"],
"template-curly-spacing": ["error"],
"@typescript-eslint/member-ordering": [
"error",
{
"default": [
"private-field",
"protected-field",
"public-field",
"constructor",
"private-method",
"protected-method",
"public-method"
]
}
],
"dot-location": ["error", "property"],
// Import
"import/no-duplicates": ["error"],
"import/no-namespace": ["error"],
"no-restricted-imports": ["error", {
"patterns": ["../*", "**/app_colors", "**/app_sizes", "**/app_fonts", "**/colors.json"]
}],
"import/order": ["error", {
"newlines-between": "always",
"groups": ["builtin", "external", "internal", "unknown"],
"pathGroups": [
{ "pattern": "~/**", "group": "internal" },
{ "pattern": "./**", "group": "unknown" }
]
}]
}
}