-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
97 lines (96 loc) · 2.7 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
// https://eslint.org/docs/latest/rules/
// https://eslint.org/docs/latest/developer-guide/shareable-configs
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/src/configs/eslint-recommended.ts
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/naming-convention.md#enforce-that-interface-names-do-not-begin-with-an-i
module.exports = {
root: true,
parser: "@typescript-eslint/parser",
plugins: ["@typescript-eslint", "prettier", "import"],
settings: {
"import/resolver": {
typescript: {},
},
"react": {
"version": "detect"
},
},
extends: [
"eslint:recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended",
"plugin:import/recommended",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:import/typescript",
"plugin:react-hooks/recommended"
],
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
project: ["./tsconfig.json"],
extraFileExtensions: [".json", ".bazed"]
},
globals: {
__DEV__: false,
jasmine: false,
beforeAll: false,
afterAll: false,
beforeEach: false,
afterEach: false,
test: false,
expect: false,
describe: false,
jest: false,
it: false,
},
rules: {
"array-callback-return": "error",
"no-debugger": "off",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/explicit-function-return-type": "error",
"@typescript-eslint/no-explicit-any": "off",
"react/react-in-jsx-scope": "off",
"@typescript-eslint/no-var-requires": "off",
"no-empty": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-inferrable-types": "off",
// 'react-hooks/exhaustive-deps': 'off',
'@typescript-eslint/no-empty-interface': 'off',
'@typescript-eslint/no-this-alias': 'off',
'no-async-promise-executor': 'off',
"import/order": [
"error",
{
"newlines-between": "always",
alphabetize: {
order: "asc",
caseInsensitive: true,
},
},
],
"no-constant-condition": "off",
"prettier/prettier": [
"error",
{
endOfLine: "auto",
},
],
// ban-types. allow {} empty object. ALLOW IT
// "@typescript-eslint/ban-types": [
// {
// types: {
// object: false,
// },
// },
// ],
},
overrides: [
{
files: ["*.tsx"],
rules: {
"@typescript-eslint/explicit-function-return-type": "off",
},
},
],
};