-
Notifications
You must be signed in to change notification settings - Fork 3
/
.eslintrc
137 lines (135 loc) · 3.75 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
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
135
136
137
{
"extends": ["standard", "prettier", "plugin:import/errors", "plugin:import/warnings"],
"parser": "babel-eslint",
"parserOptions": {
"ecmaVersion": 2017,
"ecmaFeatures": {
"classes": true,
"experimentalObjectRestSpread": true,
"impliedStrict": true,
"jsx": true
}
},
"globals": {
"GATSBY_DISQUS_SHORTNAME": "writable"
},
"env": {
"browser": true,
"jquery": true,
"node": true,
"es6": true
},
"rules": {
"arrow-body-style": ["error", "as-needed"],
"arrow-parens": "off",
"class-methods-use-this": "off",
"comma-dangle": ["warn", "always-multiline"],
"consistent-return": "warn",
"curly": ["warn", "all"],
"func-names": "off",
"function-paren-newline": "off",
"global-require": "off",
"implicit-arrow-linebrake": "off",
"import": "off",
"import/extensions": "off",
"import/no-extraneous-dependencies": "off",
"import/order": "warn",
"import/prefer-default-export": "off",
"import/newline-after-import": ["error", { "count": 2 }],
"indent": ["error", 4],
"key-spacing": "off",
"linebreak-style": "off",
"max-len": [
"warn", {
"code": 120,
"ignoreComments": true,
"ignorePattern": "(\\${tw\\`(.*)\\`}$|src\\:(.*))",
"ignoreStrings": true,
"ignoreUrls": true
}
],
"no-console": "error",
"no-debugger": "error",
"no-duplicate-imports": "warn",
"no-else-return": "off",
"no-extra-semi": "warn",
"no-multi-spaces": "warn",
"no-param-reassign": "off",
"no-restricted-globals": "off",
"no-trailing-spaces": "warn",
"no-undef": "off",
"no-underscore-dangle": "warn",
"no-unused-expressions": [
"warn", {
"allowTaggedTemplates": true
}
],
"no-unused-vars": [
"warn", {
"argsIgnorePattern": "res|next|stage|^err|on|config"
}
],
"no-use-before-define": "off",
"nonblock-statement-body-position": "off",
"object-curly-newline": "off",
"operator-linebreak": [
"warn", "after", {
"overrides": {
"?": "ignore",
":": "ignore"
}
}
],
"padded-blocks": "off",
"prefer-destructuring": "off",
"quotes": [
"error", "single", {
"avoidEscape": true,
"allowTemplateLiterals": true
}
],
"semi": ["error", "always"],
"keyword-spacing": "error",
"space-before-function-paren": "off",
"jsx-quotes": ["error", "prefer-single"],
// JSX-a11y
"jsx-a11y/accessible-emoji": "off",
"jsx-a11y/anchor-is-valid": [
"warn", {
"aspects": ["invalidHref"]
}
],
"jsx-a11y/href-no-hash": "off",
// React
"react/default-props-match-prop-types": "off",
"react/destructuring-assignment": "off",
"react/display-name": "warn",
"react/forbid-prop-types": "off",
"react/jsx-boolean-value": "off",
"react/jsx-closing-bracket-location": "off",
"react/jsx-curly-brace-presence": "off",
"react/jsx-filename-extension": [
"warn", { "extensions": [".js", ".jsx"] }
],
"react/jsx-first-prop-new-line": "off",
"react/jsx-indent": ["error", 4],
"react/jsx-indent-props": "off",
"react/jsx-max-props-per-line": [
"warn", {
"maximum": 5
}
],
"react/jsx-no-target-blank": "error",
"react/jsx-no-useless-fragment": "warn",
"react/jsx-one-expression-per-line": "off",
"react/jsx-wrap-multilines": "off",
"react/no-array-index-key": "off",
"react/no-danger": "off",
"react/no-unescaped-entities": "off",
"react/no-unused-prop-types": "warn",
"react/react-in-jsx-scope": "off",
"react/require-default-props": "off",
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "error"
}
}