-
Notifications
You must be signed in to change notification settings - Fork 2
/
.eslintrc.js
124 lines (124 loc) · 3.31 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
123
124
module.exports = {
env: {
browser: true,
jasmine: true,
jest: true,
mocha: true,
node: true,
},
extends: [
// https://github.com/eslint/eslint
"eslint:recommended",
// https://github.com/yannickcr/eslint-plugin-react
"plugin:react/recommended",
// https://github.com/facebook/react/tree/master/packages/eslint-plugin-react-hooks
"plugin:react-hooks/recommended",
// https: //github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
// https://github.com/prettier/eslint-config-prettier
"prettier",
"prettier/@typescript-eslint",
],
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 13,
sourceType: "module",
project: "./tsconfig.json",
},
plugins: ["react", "react-hooks", "@typescript-eslint"],
rules: {
camelcase: "off",
"comma-dangle": ["error", "always-multiline"],
eqeqeq: ["error", "smart"],
"global-require": "off",
"import/no-unresolved": "off",
indent: "off",
"key-spacing": ["error", { mode: "minimum" }],
"max-len": [
"error",
{
code: 115,
ignorePattern: "^import",
ignoreRegExpLiterals: true,
ignoreStrings: true,
ignoreTemplateLiterals: true,
ignoreUrls: true,
},
],
"new-cap": [
"error",
{
capIsNewExceptions: ["immutable.OrderedMap", "OrderedMap"],
newIsCapExceptions: ["kayvee.logger"],
},
],
"newline-per-chained-call": "off",
"no-console": "off",
"no-multi-spaces": [
"error",
{
exceptions: {
ImportDeclaration: true,
VariableDeclarator: true,
},
},
],
"no-param-reassign": [
"error",
{
props: false,
},
],
"no-restricted-syntax": [
"error",
{
message: "Prefer useTypedDispatch to get a typed version of dispatch.",
selector: "CallExpression[callee.name='useDispatch']",
},
],
"no-underscore-dangle": "off",
"no-unused-vars": "off",
"no-var": "off",
quotes: ["error", "double", "avoid-escape"],
"react/display-name": "off",
"react/jsx-indent": "off",
"react/no-did-update-set-state": "off",
"react/prop-types": "off",
"react/sort-comp": "off",
"vars-on-top": "off",
"@typescript-eslint/ban-ts-comment": [
"error",
{
"ts-ignore": false,
},
],
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-empty-function": ["error", { allow: ["arrowFunctions"] }],
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-floating-promises": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-unused-vars": ["error", { args: "none" }],
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/no-var-requires": "off",
},
overrides: [
{
files: ["*.ts", "*.tsx"],
rules: {
"no-undef": "off",
},
},
],
settings: {
"import/resolver": "webpack",
react: {
version: "detect",
},
},
};