-
Notifications
You must be signed in to change notification settings - Fork 3
/
.eslintrc
92 lines (91 loc) · 3.11 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
{
"root": true,
"extends": [
"@react-native",
"eslint:recommended"
],
"rules": {
"no-console": "error",
"react/react-in-jsx-scope": "off",
"prettier/prettier": 0,
// from https://github.com/soluzionifutura/eslint-config-soluzioni-futura/blob/master/index.js
"array-bracket-spacing": ["error", "never"],
"arrow-spacing": ["error"],
"brace-style": ["error", "1tbs", { "allowSingleLine": false }],
"comma-dangle": ["warn", "never"],
"comma-spacing": ["error", { "before": false, "after": true }],
"curly": ["error"],
"eqeqeq": ["warn", "always"],
"indent": ["error", 2, {
"MemberExpression": 1,
"SwitchCase": 1
}],
"key-spacing": ["error", { "mode": "strict" }],
"keyword-spacing": ["error", { "before": true, "after": true }],
"no-empty": ["error", { "allowEmptyCatch": true }],
"no-multiple-empty-lines": ["error"],
"no-trailing-spaces": ["error"],
"no-unused-vars": ["warn"],
"object-curly-spacing": ["error", "always"],
"object-shorthand": "error",
"prefer-const": 2,
"quote-props": ["error", "as-needed"],
"quotes": ["error", "double"],
"semi": ["error", "never"],
"space-before-blocks": ["error", "always"],
"space-before-function-paren": ["error", "never"],
"space-in-parens": ["error", "never"],
"space-infix-ops": ["error"],
"spaced-comment": ["error", "always", { "markers": ["/"] }]
},
"overrides": [
{
"plugins": ["@typescript-eslint"],
"files": ["*.ts", "*.tsx"],
"extends": [
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"sourceType": "module",
"project": ["./tsconfig.json"]
},
"rules": {
"@typescript-eslint/no-unnecessary-condition": "error",
"@typescript-eslint/no-non-null-assertion": "error",
// from https://github.com/soluzionifutura/eslint-config-soluzioni-futura/blob/master/index.js
"@typescript-eslint/await-thenable": "error",
"@typescript-eslint/ban-types": [
"error",
{
"types": {
"any": {},
"unknown": {}
}
}
],
"@typescript-eslint/class-literal-property-style": "error",
"@typescript-eslint/consistent-type-assertions": "error",
"@typescript-eslint/explicit-function-return-type": "error",
"@typescript-eslint/member-delimiter-style": ["error", {
"multiline": {
"delimiter": "none",
"requireLast": false
},
"singleline": {
"delimiter": "comma",
"requireLast": false
}
}],
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-floating-promises": "error",
"@typescript-eslint/no-unsafe-return": "error",
"@typescript-eslint/no-unused-vars": ["warn"],
"@typescript-eslint/type-annotation-spacing": "error",
"@typescript-eslint/typedef": "error",
"no-unused-vars": ["off"]
}
}
]
}