This repository has been archived by the owner on Apr 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 44
/
.eslintrc.js
110 lines (110 loc) · 3.13 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
module.exports = {
env: {
browser: true,
es2021: true,
},
globals: {
process: true,
module: true,
APP_SETTINGS: true,
},
env: {
es6: true,
node: true,
browser: true,
},
extends: [
"eslint:recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended"
],
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 12,
sourceType: "module",
},
settings: {
"react": {
"createClass": "createReactClass", // Regex for Component Factory to use,
"pragma": "React", // Pragma to use, default to "React"
"fragment": "Fragment", // Fragment to use (may be a property of <pragma>), default to "Fragment"
"version": "detect", // React version. "detect" automatically picks the version you have installed.
},
},
plugins: ["react", "@typescript-eslint"],
rules: {
"react/prop-types": "off",
"react/display-name": "off",
"react/no-children-prop": "off",
"react/react-in-jsx-scope": "off",
"react/jsx-no-target-blank": "off",
"react/no-unescaped-entities": "off",
"react/jsx-wrap-multilines": ["error", {
"declaration": "parens-new-line",
"assignment": "parens-new-line",
"return": "parens-new-line",
"arrow": "parens-new-line",
"condition": "parens-new-line",
"logical": "parens-new-line",
"prop": "parens-new-line",
}],
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/no-this-alias": "off",
"@typescript-eslint/no-empty-function": "off",
'@typescript-eslint/indent': ["error", 2, {
"SwitchCase": 1,
"MemberExpression": 1,
}],
'@typescript-eslint/no-unused-vars': ["error", {
"vars": "all",
"args": "after-used",
"varsIgnorePattern": "^_",
"argsIgnorePattern": "^_"
}],
"no-async-promise-executor": "off",
"semi": [2, "always"],
"comma-dangle": ["error", {
"imports": "never",
"exports": "never",
"functions": "always-multiline",
"objects": "always-multiline",
"arrays": "always-multiline",
}],
"sort-imports": ["error", {
"ignoreCase": true,
"ignoreDeclarationSort": true,
"ignoreMemberSort": false,
"allowSeparatedGroups": false,
"memberSyntaxSortOrder": ["all", "single", "multiple", "none"],
}],
"object-curly-spacing": ["error", "always"],
"array-bracket-spacing": ["error", "never"],
"object-shorthand": ["error", "always"],
"eqeqeq": ["error", "always"],
"indent": "off",
"newline-after-var": ["error", "always"],
"space-unary-ops": [2, {
"words": true,
"nonwords": true,
"overrides": {
"!": false,
"!!": false,
"+": false,
"-": false,
"++": false,
"--": false,
},
}],
"space-before-function-paren": ["error", {
"anonymous": "never",
"named": "never",
"asyncArrow": "always"
}],
},
};