-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy path.eslintrc
72 lines (72 loc) · 2.63 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
{
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"],
"extends": ["plugin:@typescript-eslint/recommended", "airbnb"],
"rules": {
"indent": ["error", 4],
"react/jsx-indent": ["error", 4],
"react/jsx-indent-props": ["error", 4],
"react/destructuring-assignment": ["off"],
"react/no-access-state-in-setstate": ["off"],
"react/require-default-props": ["off"],
// Disable so that we can use JSX in .tsx files
"react/jsx-filename-extension": ["off"],
// We are using TS for prop validation instead
"react/prop-types": ["off"],
// This is a stupid rule when it comes to inline elements like links.
// https://github.com/yannickcr/eslint-plugin-react/issues/1848
"react/jsx-one-expression-per-line": ["off"],
// Allow class properties to not have blank lines in between
"lines-between-class-members": ["error", "always",{ "exceptAfterSingleLine": true }],
// Allow one-line object destructuring assignment with up to 6 properties (default is 4):
"object-curly-newline": [
"error",
{
"ObjectExpression": {
"minProperties": 6,
"multiline": true,
"consistent": true
},
"ObjectPattern": {
"minProperties": 6,
"multiline": true,
"consistent": true
},
"ImportDeclaration": {
"minProperties": 6,
"multiline": true,
"consistent": true
},
"ExportDeclaration": {
"minProperties": 6,
"multiline": true,
"consistent": true
},
},
],
"no-continue": ["off"],
"no-await-in-loop": ["off"],
"prefer-destructuring": ["error", {
"VariableDeclarator": {"object": true, "array": false},
"AssignmentExpression": {"object": false, "array": false}
}, {"enforceForRenamedProperties": false}],
// Airbnb lint sets "never" for js, mjs, and jsx, but we need ts and tsx
'import/extensions': ['error', 'ignorePackages', {
js: 'never',
jsx: 'never',
ts: 'never',
tsx: 'never',
}],
},
"env": {
"browser": true,
"node": true,
},
"settings": {
"import/resolver": {
"node": {
"extensions": [".js", ".jsx", ".ts", ".tsx"]
}
}
},
}