-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy path.eslintrc.js
120 lines (120 loc) · 3.35 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
module.exports = {
env: {
browser: true,
es6: true,
node: true,
"shared-node-browser": true,
},
extends: [
"plugin:react/recommended",
"prettier",
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:import/errors",
"plugin:import/warnings",
],
ignorePatterns: ["*.js"],
parser: "@typescript-eslint/parser",
parserOptions: {
project: "./tsconfig.json",
ecmaVersion: 2019,
sourceType: "module",
jsx: true,
ecmaFeatures: {
experimentalObjectRestSpread: true,
},
},
plugins: ["react", "prettier", "@typescript-eslint", "import"],
rules: {
"@typescript-eslint/adjacent-overload-signatures": "error",
"@typescript-eslint/await-thenable": "error",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-empty-interface": "warn",
"@typescript-eslint/no-floating-promises": ["error", { ignoreVoid: true }],
"@typescript-eslint/no-namespace": "error",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-shadow": [
"warn",
{
hoist: "all",
},
],
"@typescript-eslint/no-unnecessary-type-assertion": "error",
"@typescript-eslint/no-use-before-define": [
"error",
{ functions: false, classes: false, variables: true },
],
"@typescript-eslint/prefer-for-of": "warn",
"@typescript-eslint/require-await": "error",
"@typescript-eslint/return-await": ["error", "never"],
"@typescript-eslint/semi": "error",
"@typescript-eslint/triple-slash-reference": "error",
"@typescript-eslint/unified-signatures": "warn",
"comma-dangle": ["error", "only-multiline"],
"constructor-super": "error",
eqeqeq: ["warn", "always"],
"import/no-deprecated": "warn",
"import/no-extraneous-dependencies": "error",
"import/no-unassigned-import": ["warn", { allow: ["**/*.scss"] }],
"import/no-unresolved": "off",
"import/prefer-default-export": "error",
"no-await-in-loop": "error",
"no-cond-assign": "error",
"no-console": "warn",
"no-debugger": "warn",
"no-duplicate-case": "error",
"no-duplicate-imports": "error",
"no-empty": [
"error",
{
allowEmptyCatch: true,
},
],
"no-floating-promises": "off",
"no-invalid-this": "off",
"no-new-wrappers": "error",
"no-param-reassign": "warn",
"no-redeclare": "error",
"no-return-await": "off",
"no-sequences": "error",
"no-shadow": "off",
"no-throw-literal": "error",
"no-unsafe-finally": "error",
"no-unused-labels": "error",
"no-var": "warn",
"prefer-const": "warn",
"prefer-destructuring": "warn",
"prefer-template": "warn",
"prettier/prettier": [
"error",
{
printWidth: 80,
tabWidth: 2,
useTabs: false,
trailingComma: "es5",
jsxBracketSameLine: false,
semi: true,
singeQuote: false,
quoteProps: "as-needed",
jsxSingleQuote: false,
bracketSpacing: true,
arrowParens: "always",
htmlWhitespaceSensitivity: "css",
endOfLine: "lf",
embeddedLanguageFormatting: "auto",
allowEmptyCatch: true,
},
],
"react/prop-types": "warn",
},
settings: {
jsdoc: {
tagNamePreference: {
returns: "return",
},
},
react: {
version: "detect",
},
},
};