forked from rumsystem/rum-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
108 lines (99 loc) · 2.73 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
const path = require('path');
module.exports = {
'globals': {
'document': false,
'navigator': false,
'window': false,
},
'extends': [
'@noe132/eslint-config-react',
],
'env': {
'es6': true,
'node': true,
'browser': true,
},
'root': true,
'settings': {
'import/resolver': {
// 'typescript': {},
'typescript': {
'project': path.join(__dirname, 'tsconfig.json'),
},
},
},
'overrides': [{
'files': ['*'],
'rules': {
'react-hooks/rules-of-hooks': 'off',
'max-classes-per-file': 'off',
'consistent-return': 'off',
'prefer-template': 'off',
'no-nested-ternary': 'off',
'import/order': 'off',
'semi': ['error', 'always'],
'import/no-unresolved': ['error', {
ignore: ['puppeteer'],
}],
},
}, {
files: [
'*.ts',
'*.tsx',
],
parserOptions: {
project: 'tsconfig.json',
tsconfigRootDir: __dirname,
},
'rules': {
'@typescript-eslint/array-type': 'off',
'@typescript-eslint/explicit-member-accessibility': 'off',
'@typescript-eslint/member-ordering': 'off',
'@typescript-eslint/naming-convention': [
'error',
{
selector: 'typeLike',
format: ['PascalCase'],
},
{
selector: 'enum',
format: ['camelCase', 'PascalCase', 'UPPER_CASE'],
},
{
selector: 'interface',
format: ['PascalCase'],
// custom: {
// regex: '^I[A-Z].+$',
// match: false,
// },
},
],
'@typescript-eslint/no-parameter-properties': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-unsafe-return': 'off',
'@typescript-eslint/no-use-before-define': 'off',
'@typescript-eslint/no-useless-constructor': 'off',
'@typescript-eslint/prefer-nullish-coalescing': 'off',
'@typescript-eslint/prefer-optional-chain': 'off',
'@typescript-eslint/restrict-plus-operands': 'off',
'@typescript-eslint/restrict-template-expressions': 'off',
'@typescript-eslint/no-require-imports': 'off',
'global-require': 'off',
'@typescript-eslint/no-var-requires': 'off',
'semi': 'off',
'@typescript-eslint/semi': ['error', 'always'],
},
}],
'rules': {
'import/no-unassigned-import': 'off',
// 'no-empty-function': ['off', { 'allow': ['arrowFunctions'] }],
'implicit-arrow-linebreak': 'off',
'no-console': 'off',
'no-restricted-syntax': 'off',
'no-underscore-dangle': 'off',
'jsx-a11y/anchor-is-valid': 'off',
'jsx-a11y/anchor-has-content': 'off',
'react/jsx-no-target-blank': 'off',
'react/no-danger': 'off',
},
};