-
Notifications
You must be signed in to change notification settings - Fork 2
/
.eslintrc
104 lines (83 loc) · 3.18 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
93
94
95
96
97
98
99
100
101
102
103
104
{
"env": {
"browser": true,
"node": true,
"mocha": true
},
"globals": {
"__static": true
},
"parser": "@typescript-eslint/parser",
"extends": [
"airbnb-typescript",
"plugin:@typescript-eslint/recommended",
"prettier/@typescript-eslint",
"plugin:prettier/recommended"
],
"rules": {
// we agreed we don't like semicolons
"semi": ["error", "never"],
// we agreed class methods don't have to use "this".
"class-methods-use-this": "off",
// we like dangling commas
"comma-dangle": "off",
// we agreed we don't require default cases
"default-case": "off",
// we agreed that we're okay with idiomatic short-circuits
"no-unused-expressions": [
"error",
{
"allowShortCircuit": true
}
],
// we agreed this feels unnecessarily opinionated
"lines-between-class-members": "off",
// arguably we should not do this, but we do, 18 times
"no-shadow": "off",
// arguably we should not do this, but there are 70 cases where we do
"no-param-reassign": "off",
// third-party libs often use this
"no-underscore-dangle": "off",
// we agreed this is a bad rule
"react/destructuring-assignment": "off",
// we agreed this is gratuitous
"react/jsx-one-expression-per-line": "off",
// pushpin is inherently visual, so we've disabled quite a few accessibility rules
// it would be reasonable to re-enable these but would take some work
"jsx-a11y/no-static-element-interactions": "off",
"jsx-a11y/anchor-is-valid": "off",
"jsx-a11y/interactive-supports-focus": "off",
"jsx-a11y/no-noninteractive-tabindex": "off",
"jsx-a11y/click-events-have-key-events": "off",
"jsx-a11y/no-autofocus": "off",
"jsx-a11y/media-has-caption": "off", // randomly sourced audio doesn't come captioned
// we might want to do this, but there are 97 cases where we don't
"@typescript-eslint/explicit-member-accessibility": "off",
// we might want to this, but there are 424 places we don't
"@typescript-eslint/explicit-function-return-type": "off",
// we agreed this rule is gratuitious
"@typescript-eslint/no-use-before-define": "off",
// someday, we should turn this back on, but we use it 44 times
"@typescript-eslint/no-explicit-any": "off",
// sometimes third-party libs are typed incorrectly
"@typescript-eslint/no-non-null-assertion": "off",
// we agreed unused arguments should be left in-place and not removed
"@typescript-eslint/no-unused-vars": [
"error",
{
"args": "none"
}
],
// import-specific rulings
// we probably want to enable this, and it's violated 23 times
"import/no-extraneous-dependencies": "off",
// we probably don't like this rule, but only Content violates it, so we could have it
"import/no-named-as-default-member": "off",
// we agreed it's better to be consistent in how you export than follow this rule
"import/prefer-default-export": "off",
// tsc handles this better, and allows for multiple typed exports of the same name
"import/export": "off",
// we agreed we don't really care about this rule
"import/no-cycle": "off"
}
}