forked from trycourier/courier-react
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
122 lines (122 loc) · 3.63 KB
/
.eslintrc.js
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
module.exports = {
"extends": [
"plugin:react/recommended",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:jsx-a11y/recommended",
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2018,
"ecmaFeatures": {
"impliedStrict": true,
"classes": true,
},
},
"env": {
"browser": true,
"node": true,
"es6": true,
"jest": true,
},
"plugins": [
"react",
"jest",
"import",
"react-hooks",
"@typescript-eslint",
"jsx-a11y",
],
"rules": {
"array-callback-return": "error",
"no-await-in-loop": "error",
"object-curly-newline": ["error", {
"multiline": true,
"minProperties": 3,
"consistent": true,
}],
"brace-style": ["error", "1tbs", { "allowSingleLine": false }],
"no-return-await": "error",
"quote-props": ["error", "consistent"],
"require-await": "error",
"no-async-promise-executor": "error",
"no-throw-literal": "warn",
"no-nested-ternary": "off",
"no-duplicate-imports": ["error", { "includeExports": false }],
"import/order": "error",
"import/first": "error",
"import/default": "off",
"import/namespace": "off",
"indent": ["error", 2],
"react/no-find-dom-node": "warn",
"no-undef": "error",
"no-debugger": "warn",
"react/prop-types": 0,
"curly": "error",
"semi": ["error", "always", { "omitLastInOneLineBlock": true }],
"semi-style": ["error", "last"],
"no-console": "off",
"react/jsx-uses-react": "error",
"react/jsx-uses-vars": "error",
"no-prototype-builtins": "off",
"react/no-unescaped-entities": "off",
"object-curly-spacing": ["error", "always"],
"quotes": ["error", "double", { "allowTemplateLiterals": true }],
"comma-dangle": ["error", "always-multiline"],
"keyword-spacing": "error",
"no-multi-spaces": "error",
"no-trailing-spaces": "error",
"arrow-body-style": ["error", "as-needed"],
"space-before-function-paren": ["error", {
"anonymous": "always",
"named": "never",
"asyncArrow": "always",
}],
"no-return-assign": "error",
"padding-line-between-statements": [
"error",
{
"blankLine": "always",
"prev": "*",
"next": ["function", "if", "for", "while", "switch", "try"],
},
{
"blankLine": "always",
"prev": ["const", "let", "var"],
"next": ["block", "block-like", "multiline-expression"],
},
{
"blankLine": "always",
"prev": ["block", "block-like", "multiline-expression"],
"next": ["const", "let", "var"],
},
],
"padded-blocks": ["error", "never"],
"no-unused-expressions": "error",
"func-names": "off",
"no-underscore-dangle": "off",
"consistent-return": "off",
"radix": "off",
"guard-for-in": "off",
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
"react/jsx-max-props-per-line": [2, { maximum: 3 }],
"object-property-newline": ["error"],
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": [
"error",
{ "argsIgnorePattern": "^_" },
],
"semi": "off",
"@typescript-eslint/semi": ["error"],
"@typescript-eslint/type-annotation-spacing": ["error"],
},
"settings": {
"react": {
"createClass": "createReactClass", // Regex for Component Factory to use, default to "createReactClass"
"pragma": "React", // Pragma to use, default to "React"
"version": "detect", // React version, default to the latest React stable release
},
"import/resolver": { "node": { "extensions": [".js", ".jsx", ".ts", ".tsx"] } },
},
};