-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.eslintrc.cjs
99 lines (99 loc) · 2.86 KB
/
.eslintrc.cjs
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
module.exports = {
env: {
browser: true,
es6: true,
},
globals: {
Atomics: 'readonly',
SharedArrayBuffer: 'readonly',
},
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 'latest',
sourceType: 'module',
project: [
'./tsconfig.json',
'./tsconfig.node.json',
'./packages/logic-core/tsconfig.json',
'./packages/logic-core/tsconfig.node.json',
],
tsconfigRootDir: __dirname,
},
settings: {
react: {
version: 'detect',
},
'import/resolver': {
typescript: {
alwaysTryTypes: true,
project: [
'tsconfig.json',
'tsconfig.node.json',
'./packages/logic-core/tsconfig.json',
'./packages/logic-core/tsconfig.node.json',
],
},
},
},
plugins: ['react', '@typescript-eslint', 'import', 'prettier', 'react-hooks'],
extends: [
'plugin:react/recommended',
'plugin:react/jsx-runtime',
'plugin:import/recommended',
'standard',
'prettier',
'plugin:prettier/recommended',
'plugin:@typescript-eslint/strict-type-checked',
'plugin:@typescript-eslint/stylistic-type-checked',
],
rules: {
'prettier/prettier': 'error',
'no-void': 'off',
'import/named': 'off',
'import/default': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-unnecessary-condition': 'off',
'@typescript-eslint/class-literal-property-style': 'off',
'@typescript-eslint/ban-types': ['error', { types: { Symbol: false } }],
'@typescript-eslint/no-confusing-void-expression': 'off',
'@typescript-eslint/no-empty-function': 'off',
'no-use-before-define': 'off',
'@typescript-eslint/no-use-before-define': ['error'],
'react/react-in-jsx-scope': 'off',
'react-hooks/rules-of-hooks': 'error', // Checks rules of Hooks
'react-hooks/exhaustive-deps': 'warn', // Checks effect dependencies
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': [
'error',
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_' },
],
'@typescript-eslint/consistent-type-definitions': 'off',
'@typescript-eslint/unified-signatures': 'off',
'@typescript-eslint/use-unknown-in-catch-callback-variable': 'off',
'@typescript-eslint/restrict-template-expressions': [
'error',
{ allowNumber: true, allowBoolean: true },
],
'@typescript-eslint/no-misused-promises': [
'error',
{
checksVoidReturn: {
arguments: false,
attributes: false,
},
},
],
'@typescript-eslint/no-explicit-any': 'off',
'import/no-anonymous-default-export': [
'error',
{
allowNew: true,
},
],
'import/no-unresolved': ['error', { ignore: ['^virtual:'] }],
},
};