-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc
61 lines (60 loc) · 1.66 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
{
"parser": "@typescript-eslint/parser",
"extends": [
"preact"
],
"overrides": [
{
"files": ["*.ts", "*.tsx"],
"processor": "@graphql-eslint/graphql"
},{
"files": ["*.graphql"],
"parser": "@graphql-eslint/eslint-plugin",
"plugins": ["@graphql-eslint"],
"rules": {
"@graphql-eslint/known-type-names": "error"
}
}
],
"parserOptions": {
"operations": "./src/**/*.graphql",
"schema": "./schema.graphql"
},
"rules": {
"indent": ["error", 2],
"space-infix-ops": "error",
"space-before-blocks": ["error", "never"],
"jsx-quotes": [
"error",
"prefer-double"
],
"arrow-parens": ["error", "as-needed"],
"arrow-spacing": ["error", { "before": true,
"after": true
}
],
"no-invalid-this": "off",
"no-unused-vars": "error",
"no-use-before-define": "error",
"object-curly-spacing": ["error", "always"],
"array-bracket-spacing": ["error", "never"],
"max-len": ["error", {
"code" : 80,
"ignoreTrailingComments": true
}],
"multiline-ternary": ["error", "always-multiline"],
"operator-linebreak": ["error", "before"],
// -- react eslint rules
"react/jsx-indent": ["error", 2, {"checkAttributes": true, "indentLogicalExpressions": true}],
"react/jsx-indent-props": ["error", 2],
"react/jsx-max-props-per-line": ["error", {
"maximum": {
"single": 3,
"multi": 1
}
}],
"react/jsx-first-prop-new-line": ["error", "multiline"],
"react/jsx-closing-bracket-location": ["error", "line-aligned"],
"react/jsx-curly-spacing": ["error", {"when": "never", "children": true}]
}
}