.eslintrc 5.22 KB
Newer Older
Matija Obreza's avatar
Matija Obreza committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{
  "env": {
    "browser": true,
    "node": true,
    "es6": true
  },
  "parser": "@typescript-eslint/parser",
  "parserOptions": {
    "project": "./tsconfig.json",
    "sourceType": "module",
    "ecmaFeatures": {
      "jsx": true
    }
  },
  "plugins": [
    "@typescript-eslint",
Oleksii Savran's avatar
Oleksii Savran committed
17
18
    "prefer-arrow",
    "react"
Matija Obreza's avatar
Matija Obreza committed
19
20
21
22
23
  ],
  "settings": {
    "react": {
      "version": "detect"
    }
Oleksii Savran's avatar
Oleksii Savran committed
24
25
26
27
28
//    "import/resolver": {
//      "node": {
//        "paths": ["src"]
//      }
//    }
Matija Obreza's avatar
Matija Obreza committed
29
30
31
32
  },
  "rules": {
    "@typescript-eslint/adjacent-overload-signatures": "error",
    "@typescript-eslint/array-type": "off",
Oleksii Savran's avatar
Oleksii Savran committed
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
    "@typescript-eslint/ban-types": [
      "error",
      {
        "types": {
          "object": false
        }
      }
    ],
    "@typescript-eslint/naming-convention": [
      "error",
      {
        "selector": "variable",
        "format": null
      },
      {
        "selector": "function",
        "format": ["camelCase", "PascalCase"]
      }
    ],
Matija Obreza's avatar
Matija Obreza committed
52
53
54
55
56
57
58
59
    "@typescript-eslint/consistent-type-assertions": "error",
    "@typescript-eslint/consistent-type-definitions": "error",
    "@typescript-eslint/explicit-member-accessibility": [
      "error",
      {
        "accessibility": "explicit"
      }
    ],
Oleksii Savran's avatar
Oleksii Savran committed
60
    // "@typescript-eslint/indent": ["error", 2],
Matija Obreza's avatar
Matija Obreza committed
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
    "@typescript-eslint/member-delimiter-style": [
      "error",
      {
        "multiline": {
          "delimiter": "comma",
          "requireLast": true
        },
        "singleline": {
          "delimiter": "comma",
          "requireLast": false
        },
        "overrides": {
          "interface": {
            "multiline": {
              "delimiter": "semi",
              "requireLast": true
            }
          }
        }
      }
    ],
    "@typescript-eslint/member-ordering": "off",
    "@typescript-eslint/no-empty-function": "error",
    "@typescript-eslint/no-empty-interface": "error",
    "@typescript-eslint/no-explicit-any": "off",
    "@typescript-eslint/no-misused-new": "error",
    "@typescript-eslint/no-namespace": "error",
    "@typescript-eslint/no-parameter-properties": "off",
    "@typescript-eslint/no-this-alias": "error",
    "@typescript-eslint/no-use-before-declare": "off",
    "@typescript-eslint/no-var-requires": "off",
    "@typescript-eslint/prefer-for-of": "error",
    "@typescript-eslint/prefer-function-type": "error",
    "@typescript-eslint/prefer-namespace-keyword": "error",
    "@typescript-eslint/triple-slash-reference": "error",
    "@typescript-eslint/type-annotation-spacing": "error",
    "@typescript-eslint/unified-signatures": "error",
Oleksii Savran's avatar
Oleksii Savran committed
98
    "react/jsx-curly-spacing": [2, "always"],
Matija Obreza's avatar
Matija Obreza committed
99
100
101
102
103
    "arrow-body-style": "off",
    "arrow-parens": [
      "error",
      "always"
    ],
Oleksii Savran's avatar
Oleksii Savran committed
104
    "brace-style": ["error", "1tbs", {"allowSingleLine": true }],
Matija Obreza's avatar
Matija Obreza committed
105
106
    "camelcase": "off",
    "capitalized-comments": "off",
Oleksii Savran's avatar
Oleksii Savran committed
107
    "comma-dangle": ["error", "always-multiline"],
Matija Obreza's avatar
Matija Obreza committed
108
109
110
111
112
113
114
115
116
117
118
119
120
121
    "complexity": "off",
    "constructor-super": "error",
    "curly": "error",
    "dot-notation": "error",
    "eol-last": "error",
    "eqeqeq": [
      "error",
      "smart"
    ],
    "guard-for-in": "error",
    "id-match": "error",
    "import/no-extraneous-dependencies": "off",
    "import/no-internal-modules": "off",
    "import/order": "off",
Oleksii Savran's avatar
Oleksii Savran committed
122
123
    "indent": [2, 2, {"SwitchCase": 1}],
    // "no-restricted-imports": ["error", {"patterns": ["../*"]}],
Matija Obreza's avatar
Matija Obreza committed
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
163
164
165
166
167
    "max-classes-per-file": [
      "error",
      10
    ],
    "max-len": [
      "error",
      {
        "code": 250
      }
    ],
    "new-parens": "error",
    "no-bitwise": "error",
    "no-caller": "error",
    "no-cond-assign": "error",
    "no-console": "off",
    "no-debugger": "error",
    "no-duplicate-case": "error",
    "no-duplicate-imports": "error",
    "no-empty": "error",
    "no-eval": "error",
    "no-extra-bind": "error",
    "no-fallthrough": "off",
    "no-invalid-this": "off",
    "no-multiple-empty-lines": [
      "error",
      {
        "max": 3
      }
    ],
    "no-new-func": "error",
    "no-new-wrappers": "error",
    "no-redeclare": "error",
    "no-return-await": "error",
    "no-sequences": "error",
    "no-shadow": [
      "off",
      {
        "hoist": "all"
      }
    ],
    "no-sparse-arrays": "error",
    "no-template-curly-in-string": "error",
    "no-trailing-spaces": "error",
    "no-undef-init": "error",
Oleksii Savran's avatar
Oleksii Savran committed
168
    "no-unneeded-ternary": "error",
Matija Obreza's avatar
Matija Obreza committed
169
170
171
172
173
    "no-unsafe-finally": "error",
    "no-unused-expressions": "off",
    "no-unused-labels": "error",
    "no-var": "error",
    "object-shorthand": "error",
Oleksii Savran's avatar
Oleksii Savran committed
174
    "object-curly-spacing": ["error", "always"],
Matija Obreza's avatar
Matija Obreza committed
175
176
177
178
179
180
181
182
183
184
185
186
187
188
    "one-var": [
      "error",
      "never"
    ],
    "prefer-arrow/prefer-arrow-functions": [
      "off",
      {
        "disallowPrototype": true,
        "singleReturnOnly": false,
        "classPropertiesAllowed": false
      }
    ],
    "prefer-const": "error",
    "prefer-object-spread": "error",
Oleksii Savran's avatar
Oleksii Savran committed
189
    "quotes": ["error", "single"],
Matija Obreza's avatar
Matija Obreza committed
190
191
192
193
194
    "quote-props": [
      "error",
      "consistent-as-needed"
    ],
    "radix": "error",
Oleksii Savran's avatar
Oleksii Savran committed
195
196
    "keyword-spacing": ["error"],
    "space-before-blocks": ["error", "always"],
Matija Obreza's avatar
Matija Obreza committed
197
198
199
200
201
202
203
204
205
206
    "space-before-function-paren": [
      "error",
      {
        "anonymous": "never",
        "asyncArrow": "always",
        "named": "never"
      }
    ],
    "spaced-comment": "error",
    "use-isnan": "error",
Oleksii Savran's avatar
Oleksii Savran committed
207
    "valid-typeof": "off"
Matija Obreza's avatar
Matija Obreza committed
208
209
  }
}