-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
95 lines (95 loc) · 2.52 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
module.exports = {
root: true,
env: {
es6: true,
jest: true,
},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
'plugin:promise/recommended',
'plugin:import/recommended',
],
plugins: ['@typescript-eslint', 'prettier', 'import', 'promise', 'unused-imports'],
rules: {
'@typescript-eslint/no-explicit-any': 'off',
'import/named': 'off',
'import/no-unresolved': 'off',
'import/order': [
'warn',
{
pathGroups: [
{
pattern: 'src/**',
group: 'parent',
position: 'before',
},
],
groups: ['builtin', 'external', 'parent', 'sibling', 'index'],
'newlines-between': 'always',
alphabetize: {
order: 'asc' /* sort in ascending order. Options: ['ignore', 'asc', 'desc'] */,
caseInsensitive: true /* ignore case. Options: [true, false] */,
},
},
],
'no-restricted-globals': [
'error',
{
name: '__dirname',
message: 'Not available in JavaScript',
},
{
name: '__filename',
message: 'Not available in JavaScript',
},
{
name: 'atob',
message:
"'atob' unavailable in React Native 0.72. Use 'decodeBase64' helper in src/obfuscation.ts instead",
},
{
name: 'btoa',
message:
"'btoa' unavailable in React Native 0.72. Use 'encodeBase64' helper in src/obfuscation.ts instead",
},
{
name: 'Buffer',
message:
"'Buffer' unavailable in JavaScript. Use 'Uint8Array' instead. For Base64, use helpers in src/obfuscation.ts",
},
{
name: 'clearImmediate',
message: "'clearImmediate' unavailable in JavaScript.",
},
{
name: 'process',
message:
"'process' unavailable in JavaScript. If this is already defined in webpack.config.js, you can safely disable the error for this line.",
},
{
name: 'setImmediate',
message: "'setImmediate' unavailable in JavaScript. Use 'setTimeout(fn, 0)' instead",
},
],
'prettier/prettier': [
'warn',
{
singleQuote: true,
trailingComma: 'all',
printWidth: 100,
},
],
'unused-imports/no-unused-imports': 'error',
},
overrides: [
{
files: ['*.spec.ts'],
rules: {
'no-restricted-globals': 'off',
},
},
],
};