aboutsummaryrefslogtreecommitdiffstats
path: root/.eslintrc
blob: c74b43cf5f4445b5b5d1e04345daefc8224936d0 (plain) (blame)
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
{
  "root": true,
  "parser": "@babel/eslint-parser",
  "extends": "eslint-config-airbnb",
  "plugins": ["jest"],
  "overrides": [
    {
      "files": ["**/*.ts", "**/*.tsx"],
      "env": { "browser": true, "es6": true, "node": true },
      "extends": ["airbnb-typescript"],
      "parser": "@typescript-eslint/parser",
      "parserOptions": {
        "ecmaFeatures": { "jsx": true },
        "ecmaVersion": 2018,
        "sourceType": "module",
        "project": "./tsconfig.json"
      },
      "plugins": ["@typescript-eslint"],
      "rules": {
        // eslint
        "arrow-parens": 0,
        "array-callback-return": 1,
        "class-methods-use-this": 0,
        "consistent-return": 0,
        "implicit-arrow-linebreak": 0,
        "linebreak-style": 0,
        "max-len": 0,
        "no-confusing-arrow": 0,
        "no-console": 0,
        "no-param-reassign": 0,
        "no-return-assign": 1,
        "no-underscore-dangle": 0,
        "no-use-before-define": 0,
        "prefer-destructuring": 1,
        "object-curly-newline": 0,
        "operator-linebreak": 0,
        // @typescript-eslint
        "@typescript-eslint/indent": 0,
        "@typescript-eslint/no-shadow": 0,
        "@typescript-eslint/no-unused-expressions": 0,
        // eslint-plugin-import
        "import/extensions": 0,
        "import/no-cycle": 1,
        "import/no-extraneous-dependencies": 0,
        "import/no-unresolved": 0,
        "import/prefer-default-export": 0,
        // eslint-plugin-react
        "react/destructuring-assignment": 0,
        "react/button-has-type": 0,
        "react/forbid-prop-types": 0,
        "react/jsx-curly-newline": 0,
        "react/jsx-no-bind": 0,
        "react/jsx-no-target-blank": 0,
        "react/jsx-props-no-spreading": 0,
        "react/no-deprecated": 1,
        "react/no-array-index-key": 0,
        "react/prefer-stateless-function": 0,
        "react/sort-comp": 0,
        "react/state-in-constructor": 0,
        "react/static-property-placement": 0,
        //  eslint-plugin-jsx-a11y
        "jsx-a11y/click-events-have-key-events": 1,
        "jsx-a11y/mouse-events-have-key-events": 1,
        "jsx-a11y/label-has-for": [
          2,
          {
            "components": ["Label"],
            "required": {
              "every": ["id"]
            },
            "allowChildren": false
          }
        ],
        "jsx-a11y/no-static-element-interactions": 0,
        "jsx-a11y/no-noninteractive-element-interactions": 1
      }
    }
  ],
  "settings": {
    "react": {
      "pragma": "React", // Pragma to use, default to "React"
      "version": "detect" // React version. "detect" automatically picks the version you have installed.
    }
  },
  "globals": {
    "window": true,
    "document": true,
    "FormData": true,
    "localStorage": true,
    "navigator": true,
    "Element": true,
    "use": true,
    "FileReader": true
  },
  "env": {
    "jest/globals": true
  },
  "rules": {
    // eslint
    "arrow-parens": 0,
    "class-methods-use-this": 0,
    "consistent-return": 1,
    "implicit-arrow-linebreak": 0,
    "function-paren-newline": 0,
    "max-len": 0,
    "no-await-in-loop": 1,
    "no-console": [1, { "allow": ["warn", "error"] }],
    "no-param-reassign": 1,
    "no-restricted-syntax": 0,
    "no-underscore-dangle": 0,
    "operator-linebreak": 0,
    "prefer-destructuring": 1,
    "object-curly-newline": 0,
    // eslint-plugin-import
    "import/extensions": 1,
    "import/prefer-default-export": 0,
    "import/no-extraneous-dependencies": 0, // various false positives, re-enable at some point
    "import/no-unresolved": 1,
    // eslint-plugin-react
    "react/forbid-prop-types": 1,
    "react/destructuring-assignment": 0,
    "react/jsx-filename-extension": 1,
    "react/jsx-no-bind": 1,
    "react/jsx-props-no-spreading": 0,
    "react/prefer-stateless-function": 1,
    "react/static-property-placement": 0,
    "react/state-in-constructor": 1,
    "react/sort-comp": 0,
    //  eslint-plugin-jsx-a11y
    "jsx-a11y/click-events-have-key-events": 1,
    "jsx-a11y/no-static-element-interactions": 1,
    "jsx-a11y/no-noninteractive-element-interactions": 1
  }
}